You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to be able to configure things, such as when the start of the day is. Many of us work past midnight, and consider it part of the prior day's work. So, it'd be nice to have the logging use our preferred "start of day" time.
There should be a config file in $XDG_CONFIG_HOME/hey/config.toml (or similar) that allows users to specify that time. I think that file should probably be TOML, but am open to suggestions. Just not YAML because way too many developers hate YAML. :/
The text was updated successfully, but these errors were encountered:
Just realized that a nice way to handle this is to
limit choice to an even hour. E.g. 4 AM not 4:44 AM
whenever doing calculations for reporting purposes just have them run within a time zone that corresponds to the requested hour.
That is to say, if i'm in Eastern Standard Time and I set my "end/start of day" to 4 am then behind the scenes, and only for the purposes of finding day/week/month boundaries, change my time zone from GMT -5 (EST) to GMT -9 (AKST). Midnight AKST is 4AM EST. Once we've done that we can leverage all of Raku's built in day/month functionality without doing any funky math & custom day boundary calculations everywhere.
a simple example: hey log 3 days
read in config for start/end of day
see that it's 4 hours off and add +4 to current time zone.
calculate the start of the day 3 days ago.
get that as an epoch time.
(at this point we're done mucking with the fake time zone)
query the db for entries from that time forward
pass the results on for reporting
user output works as it already does with the current time zone.
It'd be nice to be able to configure things, such as when the start of the day is. Many of us work past midnight, and consider it part of the prior day's work. So, it'd be nice to have the logging use our preferred "start of day" time.
There should be a config file in
$XDG_CONFIG_HOME/hey/config.toml
(or similar) that allows users to specify that time. I think that file should probably be TOML, but am open to suggestions. Just not YAML because way too many developers hate YAML. :/The text was updated successfully, but these errors were encountered: