Android-SimpleTimeTracker icon indicating copy to clipboard operation
Android-SimpleTimeTracker copied to clipboard

[Bug]: Hour change

Open Flecart opened this issue 1 year ago • 5 comments

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.

Flecart avatar Oct 27 '24 09:10 Flecart

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

Razeeman avatar Nov 07 '24 08:11 Razeeman

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!

Flecart avatar Nov 07 '24 08:11 Flecart

Hey :wave: 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)

cogk avatar Nov 12 '24 12:11 cogk

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

Flecart avatar Nov 12 '24 15:11 Flecart

@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 avatar Nov 12 '24 16:11 Razeeman