Conversation
The backend stamps lastTriggered as a UTC LocalDateTime without an offset suffix, but the alert rule page rendered it with formatDateTime, which parses offset-less ISO strings as browser-local time. A rule fired at 23:30 UTC then showed 23:30 in every timezone. Use formatUtcDateTime, matching the system-alert page, so the value is treated as UTC. Fixes apache#4174 Signed-off-by: jokerzsd <2701819133@qq.com>
RockteMQ-AI
approved these changes
Sep 9, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Fix timezone inconsistency in alert last-triggered display — the column was using formatDateTime (local time) while the tooltip and lastTriggeredMs both use UTC. Switching to formatUtcDateTime makes the column consistent with the rest of the timestamp handling.
Clean one-line fix, correctly references issue #4174. LGTM.
Automated review by github-manager-bot
This was referenced Sep 11, 2026
Member
|
Closing as a duplicate of #4175, merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the alert rule "最近触发时间" (last-triggered) column rendering a UTC timestamp as browser-local time.
Problem
The backend stamps
lastTriggeredas a UTCLocalDateTimewithout an offset suffix (e.g.2026-08-23T23:30:00). The rule page rendered it withformatDateTime, which parses offset-less ISO strings withnew Date(...)as browser-local time. A rule that fired at 23:30 UTC showed 23:30 in every timezone.Fix
Use
formatUtcDateTime(already used by the system-alert page), which appendsZto offset-less strings so they are parsed as UTC. This also covers/ops/business-alerts, which reuses the sameAlertsPagecomponent.Test plan
cd web && npx tsc -bpasses.Fixes #4174