Skip to content

fix: session export timestamps for half-hour timezones - #13148

Open
tonycoder-hub wants to merge 1 commit into
continuedev:mainfrom
tonycoder-hub:cursor/fix-session-export-timestamp-half-hour-timezones-c563
Open

fix: session export timestamps for half-hour timezones#13148
tonycoder-hub wants to merge 1 commit into
continuedev:mainfrom
tonycoder-hub:cursor/fix-session-export-timestamp-half-hour-timezones-c563

Conversation

@tonycoder-hub

Copy link
Copy Markdown

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.

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.
@tonycoder-hub
tonycoder-hub requested a review from a team as a code owner August 17, 2026 10:42
@tonycoder-hub
tonycoder-hub requested review from sestinj and removed request for a team August 17, 2026 10:42
@tonycoder-hub

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cursor
cursor Bot force-pushed the cursor/fix-session-export-timestamp-half-hour-timezones-c563 branch from 7ce14bd to b667e11 Compare August 17, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant