Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date group title in web timeline confuses time zones #15634

Open
1 of 3 tasks
C-Otto opened this issue Jan 25, 2025 · 0 comments
Open
1 of 3 tasks

Date group title in web timeline confuses time zones #15634

C-Otto opened this issue Jan 25, 2025 · 0 comments
Labels
date-time Issues with date/time/time zone 🖥️web

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Jan 25, 2025

The bug

See #12650 (comment) and #12650 (comment)

The date shown for the group may be "today" or "yesterday". This is determined based on the comparison of "now" and the asset's date, truncated to midnight (start of the day). During this, the asset date's local time is used (which is UTC from a technical point of view), whereas the browser time (now) might include time zone offset information. As a result of this, an asset created today, having the "localDateTime" of today, might be shown as "yesterday" or "tomorrow".

web/src/lib/utils/timeline-util.ts:98

Version of Immich Server

v1.125.2

Platform with the issue

  • Server
  • Web
  • Mobile

Reproduction steps

  • modify asset time to today's date, 00:00:00 in time zone Pacific/Honolulu
  • set server's time zone to Pacific/Honolulu (TZ in .env)
  • set browser system's time zone to Pacific/Honolulu timedatectl set-timezone Pacific/Honolulu
  • set local time to 13:59:00 date -s "2025-xx-yy 13:59:00"
  • see image show as "today"
  • wait until time is 14:00 (which is midnight UTC)
  • see image show as "yesterday"
@C-Otto C-Otto added 🖥️web date-time Issues with date/time/time zone labels Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
date-time Issues with date/time/time zone 🖥️web
Projects
None yet
Development

No branches or pull requests

1 participant