fix: parse SQLite timestamps as UTC, not local time #30
Reference in New Issue
Block a user
Delete Branch "fix/sqlite-utc-timestamps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SQLite datetime('now') returns 'YYYY-MM-DD HH:MM:SS' with no timezone
marker. JS was treating this as local time, so timestamps showed the
correct UTC digits but with the local TZ abbreviation attached (e.g.
'7:15 PM EDT' when the real local time was '3:15 PM EDT').
Add parseUtc() which appends 'Z' before parsing any string that has no
existing timezone marker, ensuring JS always treats them as UTC before
the display-timezone conversion is applied.
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
SQLite datetime('now') returns 'YYYY-MM-DD HH:MM:SS' with no timezone marker. JS was treating this as local time, so timestamps showed the correct UTC digits but with the local TZ abbreviation attached (e.g. '7:15 PM EDT' when the real local time was '3:15 PM EDT'). Add parseUtc() which appends 'Z' before parsing any string that has no existing timezone marker, ensuring JS always treats them as UTC before the display-timezone conversion is applied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>