traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.17k stars 58 forks source link

Time calculation wrong if end time is in the future. #105

Closed deisi closed 2 years ago

deisi commented 2 years ago

Describe the bug If you define the end time of a task in the future, the time calculation is wrong. See screenshot for prove

To Reproduce I just observed this wrong calculation while it was about 16:20 at that day. So I setted the end time to something in the future at that point. Thus I assume this is what is causing the issue. Steps to reproduce the behavior:

  1. Start task
  2. Define stop time in future
  3. Take a look at how current time effects calculated

Expected behavior Well current time should be irrelevant for task duration at that point.

Screenshots time_calc_wrong

Additional context I don't think there is anything special but I use a docker container and run version 0.2.1. I

jmattheis commented 2 years ago

What exactly is wrong? 13 to 17 are 4 hours.

deisi commented 2 years ago

Ups, I did not look at this correctly for some reason I was reading 33 min and not 33s. Never mind