Repository navigation
Conversation
SAIC sends messageTime as naive server local time (CET/CEST on the EU servers), but the gateway tagged it as UTC, so the last message time and the new message check were off by one or two hours. Use createTime when present, otherwise read messageTime in the server timezone, set with --saic-message-timezone / SAIC_MESSAGE_TIMEZONE (default Europe/Rome). Messages without a usable time are still read and deleted as before, but no longer count as the newest message, move last_message_ts or get published as the last message.
nanomad
force-pushed
the
fix/message-times-utc
branch
from
November 22, 2026 10:21
1602a94 to
27950c6
Compare
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.
Includes the bump to
saic-ismart-client-ng0.15.0, which adds the message time helpers this uses. #523 (power tailgate) shares that commit.The bug
messageTimeis naive server local time (CET/CEST on EU servers), butensure_datetime_awarelabeled it UTC. Message times were off by 1–2 hours.now()frommessage_time. It then looked like the newest message and pushedlast_message_tsforward. WithTZset in Docker, e.g.Australia/Sydney, that was about 10 hours in the future.Changes
utils.message_time_utc()returns an aware UTC datetime orNone. It usescreateTime(a Unix timestamp) when present. Otherwise it readsmessageTimein the server timezone and converts it to UTC.--saic-message-timezone/SAIC_MESSAGE_TIMEZONE, defaultEurope/Rome. It takes an IANA name orGMT+HH:MM. The container'sTZdoesn't affect message times.MessageHandlerskips messages without a time when picking the latest one and when deciding to stop paging. Reading and deleting messages work as before.MessagePublisherpublishes nothing for a message without a time.ensure_datetime_awareis removed, since it has no callers left.Notes
Europe/Rome. Their server timezone is unknown, so users there need to setSAIC_MESSAGE_TIMEZONE.