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

[Bug]: Hour change #242

Open
Flecart opened this issue Oct 27, 2024 · 5 comments
Open

[Bug]: Hour change #242

Flecart opened this issue Oct 27, 2024 · 5 comments

Comments

@Flecart
Copy link

Flecart commented Oct 27, 2024

Hi, some countries there is a change of hour two times a year. here It seems that the application doesn't effectly count this effect when it happens.

@Razeeman
Copy link
Owner

Razeeman commented Nov 7, 2024

Hello! Thank you for the feedback. Can you explain a little bit more how it could be effectively accounted for?

@Flecart
Copy link
Author

Flecart commented Nov 7, 2024

Hi, I think one possible solution is to put timestamp relative to Greenwich time, so the change of hours is always accounted for.
This is what I am expecting from user experience PoV:

  1. When I use the app for the first time, i get asked my timezone, or automatically gets the timezone from geographical info or phone if it provides it. I see from the exports that there is no timezone information on the hour times.
  2. We need a way to display the local time relative to the saved Greenwich time, then app works the same way as before i think.
  3. If there is a time change, we can expect the user to manually change its timezone, or we can ask at the beginning to the user if he wants to automatically account for these types of change.

Tell me what do you think about this possible sol!

@cogk
Copy link
Contributor

cogk commented Nov 12, 2024

Hey 👋 I'm not sure I understand correctly the problem you encountered, to me it looks like the time change is already correctly handled, even the double interpretation of 00:00 (both 00:00:00+00:00 and 00:00:00+01:00 which are 1 hour apart)

@Flecart
Copy link
Author

Flecart commented Nov 12, 2024

Oke, no clue, well check again in 6 months then.

@Flecart Flecart closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
@Razeeman
Copy link
Owner

Razeeman commented Nov 12, 2024

@Flecart Thank you for the clarification!

Currently timestamps are saved as unix epoch timestamps, which doesn't have time zone, and time zone is applied on the ui according to the system time. Because of that when time zone changes, times are changed in the app but durations are preserved.

For example if current time is 15:00, time zone is +2gmt, and activity is started at 13:00, it will show duration of 2 hours. When the time zone changes to +1gmt, current time will be 14:00, and the app will show that the activity was started at 12:00, so it duration will still be 2 hours.

One thing thought, is the app currently needs to be restarted to correctly show new times everywhere, on widgets, notifications etc. Probably could look into this and fix somehow, to avoid confusion when time zone changes. Thank you for pointing this out!

@Razeeman Razeeman reopened this Nov 12, 2024
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

No branches or pull requests

3 participants