date/time entry consistency
Created by: ederag
-
When
date
andtime
can be given explicitly together, e.g.2019-09-01 02:00
, they should be local time (the same as on the desktop wall clock), as inhamster-cli
. This is seems to make more sense when entering both start and end datetimes:2019-09-01 04:00 - 2019-09-01 07:00
-
When a day is selected separately, as with the gui timeline arrows in
activity_entry
, then it means "hamster day" (that by default starts at 05:00). This way the activity will appear in exactly this selected day when displayed by the overview,hamster list
,hamster search
, ... -
When only
time
is entered, the default date should behamster_today
. Indeed, entering23.50
half an hour later refers most probably to the current hamster day. (using today would be very inconvenient here, think of entering23.50 - 00.20
...). -
Facts overlapping the hamster day start time (05:00 by default) are tricky. e.g. entering
04:00 - 07:00
on 2019-09-01 at 07:30 would result in a2019-09-02 04:00 - 2019-09-01 07:00
, hence with a negative duration. This has been solved for the gui in PR #437 by incrementing the end date (more secure than decrementing the start date) in case of negative duration. A warning and a means to check and correct entry was given. For command line this is a bit trickier. Just error on negative durations and require user to give full datetime information ?