dominikbraun / timetrace

A simple CLI for tracking your working time.
Apache License 2.0
679 stars 75 forks source link

Times appear to be recorded in local timezone #132

Open akaszynski opened 3 years ago

akaszynski commented 3 years ago

When changing timezones the results from timetrace list records today do not change. Times should be recorded in UTC and displayed relative to the current timezone.

dominikbraun commented 3 years ago

Even though timetrace is still at v0.10.0, I'd like to maintain backwards-compatibility. So there are three options to switch to UTC:

@aligator PTAL

aligator commented 3 years ago

I would say we should add an automatic conversion which is run the first time someone uses timetrace in the new version. (we can add something like a file with a version number somewhere in the .timetrace folder to indicate a new file-format.)

As I recently had a similar requirement at my daily work, I noticed some things to be aware of when using UTC in the "backend" and any localtime in the frontend:

An additional suggestion: When we are anyway in process of changing the file format: Why don't we use a one-file database such as sqlite? It would have several benefits, such as

--> Actually this is no easy task but we should change the saved values to UTC.