fix: session export timestamps for half-hour timezones - #13148
Open
tonycoder-hub wants to merge 1 commit into
Open
fix: session export timestamps for half-hour timezones#13148tonycoder-hub wants to merge 1 commit into
tonycoder-hub wants to merge 1 commit into
Conversation
getOffsetDatetime split the timezone offset into whole hours plus leftover minutes. Math.floor rounds negative offsets away from zero, so zones east of UTC that are not a whole number of hours ahead (UTC+05:30, +05:45, +09:30, ...) were shifted an extra hour: a session shared at 15:30 IST was named 20260817T163000_session.md. Shift by the whole offset in milliseconds instead, which is exact for every zone and also stops the helper from mutating its argument.
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
cursor
Bot
force-pushed
the
cursor/fix-session-export-timestamp-half-hour-timezones-c563
branch
from
August 17, 2026 10:44
7ce14bd to
b667e11
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.
getOffsetDatetime split getTimezoneOffset into hours plus leftover minutes. East of UTC the offset is negative, so Math.floor and % shifted UTC+05:30 by 6h30m. A session shared at 15:30 IST was written as 20260817T163000_session.md.
Now shift by the whole offset at once. Tests: cd core && npx vitest run util/historyUtils.vitest.ts -> 3 passed. Distinct from #13143-#13147.