Automatic rounding of time values #156
jotaen
started this conversation in
Feature ideas & discussions
Replies: 1 comment 2 replies
-
How would entries with tags be handled? I'm thinking broadly that the carryover would be odd when you round. In your example, if I add original
adjusted
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you use the CLI for starting and stopping activities, it puts the exact time values into the file:
While that’s most accurate, it doesn’t look very tidy.
Idea:
klog round
command for cleaning up the dataThere could be a command along the lines of
klog round
, which would go through all entries, and round all times to the nearest 15, 30 or 60 minute value. E.g.likeklog round --precision=15m
would change the data to:In order for the rounding error to be as small as possible, it would keep track of and account for the carryover while adjusting the values, so that the error never becomes bigger than what the specified precision is.
Optionally, it could add the carryover as additional entry:
Idea:
--precision
flag orKLOG_PRECISION=
env variableIt could also be that
klog start
andklog stop
take the rounding into account right away. However, then it’s more tricky to implicitly confine the cumulative error, because subsequent invocations don’t know what the previous error was. That’s either okay, or it could be solved via:-7m
above), that’s updated on an ongoing basis whenever you doklog start
orklog stop
.~/.klog
folder.Beta Was this translation helpful? Give feedback.
All reactions