sum command doesn't respect configured timezone
beauraines opened this issue · comments
I am in the Pacific timezone (America/Los_Angeles
) and my afternoon is after UTC
has rolled over to the next day. The sum
command is grouping the days by the date returned by the API, in UTC. I would expect that the days would be grouped respecting my configured timezone.
In this example, the entries from 4 August are really 4 August UTC, which is still 3 August in my configured timezone. I would expect to see 3 August as 7:27:53
, which matches what the reports show.
$ toggl sum -st -s $(gdate -d '5 days ago' --iso-8601)
Day Total time
total 16:00:09
08/04/2021 1:12:30
08/03/2021 7:21:55
08/02/2021 7:25:44
I think I have a fix for this issue, but I do not understand how the tests function.
Notably, when using the --use-reports
option, it performs as expected
$ toggl sum -st -s $(gdate -d '5 days ago' --iso-8601) --use-reports
Day Total time
total 16:00:09
08/03/2021 7:27:53
08/02/2021 8:32:16