Inconsistent handling of dates and times
Created by: GeraldJansen
There are a number of places where dates and/or times are not handled consistently in current hamster. In part that is due to separate date-time parsing in hamster-cli.py and in lib.parse_fact() . These inconsistencies are confusing at best and in the case of rounding or not rounding times to nearest minute they can lead to different time totals reported by different versions of hamster (eg. #76 (closed)).
Issues:
- command line expects yyyy-mm-dd whereas edit_activity window expects dd-mm-yyyy
- command line help says times can be specifed as hh:mm:ss but the seconds are truncated to 0 when using hamster[-cli] start/stop
- starting/stopping a new activity from the GUI results in timestamps accurate to seconds, but any subsequently edits result in the seconds being set to 0.
Concerning the date format, the simplest solution would be to use DATE_FMT = '%Y-%m-%d'
in lib.parse_fact to be consistent with the format used in hamster-cli, both for input and for listings and data export.
Concerning truncating timestamps to minute accuracy, I would be in favour of doing this consistently throughout hamster. Another possibility would be to offer a user preference to use either minute or second accuracy, and then apply that preference consistently throughout the application.