timetagger icon indicating copy to clipboard operation
timetagger copied to clipboard

Start a day not at 00:00

Open ouuan opened this issue 2 years ago • 2 comments

I often go to sleep after 00:00, so it would be nice to be able to configure the start of a day. I mainly want it when focusing "today" ("snap to now"). It could also be used in reports grouped by date.

ouuan avatar Feb 05 '22 04:02 ouuan

Interesting idea. I sometimes have the same problem, but I then either let it be, or drag the record backwards so its fully in the previous day :)

I think it should be possible to configure the day's start time, but indeed then it should also hold up for the report.

almarklein avatar Feb 05 '22 14:02 almarklein

Would be great to set starting and ending hours

lgaudreau avatar Jun 22 '22 20:06 lgaudreau

I was initially positive about this idea, but now that I looked into it, I decide against it. The main reason is that the definition of when a day starts is pretty clear (in contrast to when a new weeks starts #157). This means that some things are technically quite challenging, resulting in more complex code (e.g. in the dt.floor()), which also means higher risk on bugs, but I also think it may simply be confusing, e.g. imagine this timeline 🤔:

In summary, although I understand the use-case (and share it), I don't think its a good idea to allow changing day boundaries. As a workaround, just drag your late-night records back into the previous day. Or - speaking for myself here - go to bed on time, it'll do you good ❤️

almarklein avatar Nov 21 '22 14:11 almarklein

I think it will be very helpful even if this only affects the range of snapping to "today".

ouuan avatar Nov 21 '22 14:11 ouuan

Mmm. So the only place where we apply the offset is when snapping to today. I think this could work ...

almarklein avatar Nov 21 '22 15:11 almarklein

@ouuan thanks for the suggestion. It's a pragmatic solution that I think covers the most pain points, while not having the downsides that I mentioned earlier. Done in #291

almarklein avatar Nov 21 '22 16:11 almarklein

New release with this change is now available. Let's see how this works out! 🚀

almarklein avatar Nov 21 '22 23:11 almarklein

Re-opening because I found an annoyance with the current implementation. In #291 clicking "today" (or pressing "D") toggles between the actual day and the offset. However, if you're in a completely different view, it first moved to the actual day, while I think it'd be more natural to go to the day with offset instead.

almarklein avatar Nov 26 '22 20:11 almarklein