Skip to content

fix: sync time always showing stale 8h ago#1

Merged
doodlewind merged 1 commit intomainfrom
doodlewind/fix-sync-time-stale
Mar 27, 2026
Merged

fix: sync time always showing stale 8h ago#1
doodlewind merged 1 commit intomainfrom
doodlewind/fix-sync-time-stale

Conversation

@doodlewind
Copy link
Copy Markdown
Contributor

Summary

  • SQLite datetime('now') stores UTC without a Z suffix — JS new Date() parsed it as local time, so the sync timestamp was always off by the user's timezone offset (8h in UTC+8)
  • Append Z before parsing in both the Electron status bar and CLI status command

Test plan

  • Run pnpm dev, trigger sync, verify status bar shows "just now" instead of "8h ago"
  • Run spool status in CLI, verify last synced time is correct

🤖 Generated with Claude Code

SQLite datetime('now') stores UTC without timezone suffix. JS
new Date() parsed it as local time, creating an offset equal to
the user's timezone. Append 'Z' to force UTC interpretation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@doodlewind doodlewind merged commit 2aa96b6 into main Mar 27, 2026
@doodlewind doodlewind deleted the doodlewind/fix-sync-time-stale branch April 7, 2026 09:47
graydawnc added a commit that referenced this pull request Apr 11, 2026
First cut of the connector subsystem Effect migration. SyncError now
extends Effect's Data.TaggedError so it participates in Effect's typed
error channel while remaining a regular throwable Error for the
Promise-based plugin boundary.

The positional constructor (code, message?, cause?) is preserved so
the Phase B contract tests and all existing call sites (twitter-bookmarks,
sync-engine wrapping, chrome-cookies) continue to work unchanged.

- Add \`effect\` dep to @spool/core
- Replace switch in retryable with a RETRYABLE_CODES set
- Drop redundant WHAT-comments on needsReauth/retryable

All 65 @spool/core tests remain green; tsc clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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