guix package --list-generations uses UTC and time-at-midnight for hour durations

  • Open
  • quality assurance status badge
Details
One participant
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
pelzflorian (Florian Pelz)
Severity
normal
P
P
pelzflorian (Florian Pelz) wrote on 28 Dec 2018 10:31
(address . bug-guix@gnu.org)
20181228093120.dufnb4o5py7o4mvl@pelzflorian.localdomain
Hello Guix,

I would expect guix package --list-generations=…h to display
generations from the past … hours, but apparently it displays
generations offset from UTC midnight (apparently not local time?) and
not the current time, since guix/ui.scm calls a procedure named
time-at-midnight.

In particular, when `guix package --list-generations` shows

Generation 38 Dec 15 2018 13:04:16 (current)

then I would expect

$ date --date="Dec 15 2018 13:04:16" +%s
1544875456
$ date +%s
1545989113
$ guix package --list-generations=$(((1545989113-1544875456)/3600+1))h

to display the current generation.

I think either the time for hours should not be computed from midnight
and should use local time for days/weeks. Alternatively, the
description in the manual should be adjusted.

Regards,
Florian
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 33892@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33892
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch