Skip to content

Comments

Fix timezone handling: use configured timezone instead of browser timezone#60

Merged
fatherlinux merged 1 commit intomainfrom
fix-timezone-bugs
Feb 6, 2026
Merged

Fix timezone handling: use configured timezone instead of browser timezone#60
fatherlinux merged 1 commit intomainfrom
fix-timezone-bugs

Conversation

@fatherlinux
Copy link
Owner

Summary

  • Fixes bug where pomodoro entries appeared in wrong AM/PM sections when browser timezone differed from configured app timezone
  • Adds global appTimezone variable that reflects the user's configured timezone setting
  • Adds "Automatic" option to timezone dropdown showing browser-detected timezone
  • Introduces createDateInTimezone() helper for timezone-aware date creation
  • Adds automated Puppeteer tests for timezone functionality

Changes

  • Add appTimezone global variable updated when settings load or timezone changes
  • Add createDateInTimezone() to interpret user-entered times in configured timezone
  • Add formatTimeSnappedTz() and formatDateWithDayTz() timezone-aware helpers
  • Update formatDate() and formatDateWithDay() to use appTimezone
  • Fix AM/PM split in weekly grid to use configured timezone
  • Fix addManualPomodoro() and addPomoToNextSlot() to create entries in configured timezone
  • Add tests/test_timezone.js with automated Puppeteer tests

Test plan

  • Set browser to one timezone (e.g., Europe/Brussels)
  • Set app timezone to a different timezone (e.g., America/New_York)
  • Add entry via PM + button - verify it appears in PM section
  • Add entry via timer start/stop - verify time displays correctly
  • Set app timezone back to match browser - verify entries still display correctly
  • Test "Automatic" timezone option shows detected browser timezone

Run automated tests: node tests/test_timezone.js

🤖 Generated with Claude Code

…ezone

- Add global appTimezone variable updated from settings
- Add createDateInTimezone() helper for timezone-aware date creation
- Add formatTimeSnappedTz() and formatDateWithDayTz() helpers
- Update formatDate() and formatDateWithDay() to use appTimezone
- Fix AM/PM split in weekly grid to use configured timezone
- Fix addManualPomodoro() to create entries in configured timezone
- Fix addPomoToNextSlot() to use configured timezone
- Add "Automatic" option to timezone dropdown showing browser-detected TZ

Fixes issue where entries appeared in wrong AM/PM sections when browser
timezone differed from configured app timezone.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fatherlinux fatherlinux merged commit c9bf7fe into main Feb 6, 2026
3 checks passed
@fatherlinux fatherlinux deleted the fix-timezone-bugs branch February 6, 2026 20:57
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