Reset seconds after manually editing time entry
Description
There seems to be a rounding error in the recorded times. Probably because of seconds part of the starting/end time.
For example, I have entries starting at 13:00 and ending at 14:00 and the recorded time shows 0:59 instead of 1:00
Or something like this, where the total is 4:31 instead of 4:30
The seconds part of recorded times should probably be hardcoded to 00 to not have this happen
Steps To Reproduce
- Create a manual entry spanning one hour, for example 13:00 - 14:00
- Sometimes it gets recorded as 1:00, other times as 0:59 or 1:01
Self-hosted or Cloud?
Self-Hosted
Version of solidtime: (for self-hosted)
latest
solidtime self-hosting guide: (for self-hosted)
official guide from github
Thanks for the report. You are right that is because of the seconds. We'll discuss this, but your suggestion with settings the seconds to 00 after editing the record manually sounds like a good idea. I'll rename the issue since this is not a rounding error.
This also occurs when starting a task, eg: starting a task at 5:45:34 pm logs it as starting at that time, when I think it should be logged as starting at 5:45:00 pm. An option to truncate seconds would be nice for UX, and is a compromise between improving UX for people like the OP and I and maintaining compatibility. In the meantime, I did make this small Python script to strip out nonzero seconds from the data. Here it is in case anyone else might find it useful. My setup is identical to the OP: latest, self-hosted running in a docker compose stack.