mrusme / zeit

Zeit, erfassen. A command line tool for tracking time spent on activities.
https://マリウス.com/zeit-erfassen-a-cli-activity-time-tracker/
GNU General Public License v3.0
237 stars 19 forks source link

When the start/end time for an existing entry is modified, nanoseconds portion left out #3

Open khughitt opened 3 years ago

khughitt commented 3 years ago

When the start or end time is modified for an existing entry (e.g. zeit entry --finish xx), the updated time is stored without the nanoseconds portion, potentially leading to issues when parsing the output from zeit export.

Version info:

mrusme commented 3 years ago

@khughitt not exactly sure how to solve this issue, since it's more like a user-entry error. If a user specifies every detail in RFC3339 format, then it's being stored correctly:

zeit entry --begin "2021-02-07T11:11:12.917391-04:00" e2b9ac6d-2b57-41e3-9069-db308582d991

It's also questionable whether nanoseconds are actually relevant for time entries. So maybe the fix would be to remove this info altogether?

khughitt commented 3 years ago

@mrusme Ah okay, I was following the example from the README, which doesn't include nanoseconds in the time specification, and hence, I the updated entry didn't have them either.

In any case, I think you are right though -- personally, I can't imagine ever needing something better than ~1 minute resolution. We can save the nanosecond resolution tracking for some future dystopian corporate world >.<.