solidtime icon indicating copy to clipboard operation
solidtime copied to clipboard

Reset seconds after manually editing time entry

Open Choque opened this issue 8 months ago • 2 comments

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

Image

Or something like this, where the total is 4:31 instead of 4:30

Image

The seconds part of recorded times should probably be hardcoded to 00 to not have this happen

Steps To Reproduce

  1. Create a manual entry spanning one hour, for example 13:00 - 14:00
  2. 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

Choque avatar Apr 03 '25 09:04 Choque

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.

korridor avatar Apr 25 '25 15:04 korridor

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.

fix_startend_times.py

jgilman1337 avatar Sep 05 '25 21:09 jgilman1337