Clarify meaning of dates given on the command line #513
Labels
component:sonalyze
sonalyze/*
task:enhancement
New feature or request
task:ux
User experience, both web and command line
(See also #507, and probably others.)
With the rewrite of sonalyze, the usage of timestamps internally has become tidier - internal times are always UTC, and the date key used in the database is also UTC. But we need to be clearer about the meaning of timestamps used on the command line in --from and --to, and ditto in the job query form. This will require documentation minimally and probably some code.
Related, what is the precise meaning of eg
1d
and other relative timestamps used on the command line?Most sensibly the dates given on the command line should be interpreted as localtime, and
1d
is "one day before now, local time". Any conversion to utc to make things work out happens internally. (This creates a mismatch in that the output from reports and so on usually are UTC, but that is a bug in its own right and should not be compounded by contorting ourselves on input.) For timestamps, and power users, it may be interesting to allow the use of an explicit utc suffixZ
, ie--from 2024-06-01Z
would look in the database starting from that day, while--from 2024-06-01
would start with 05/31 b/c the implied time of the latter timestamp is 2024-06-01T00:00:00+02:00 which is normalized as 2024-05-31T22:00:00Z.The text was updated successfully, but these errors were encountered: