unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33892: guix package --list-generations uses UTC and time-at-midnight for hour durations
@ 2018-12-28  9:31 pelzflorian (Florian Pelz)
  0 siblings, 0 replies; only message in thread
From: pelzflorian (Florian Pelz) @ 2018-12-28  9:31 UTC (permalink / raw)
  To: 33892

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-12-28  9:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-28  9:31 bug#33892: guix package --list-generations uses UTC and time-at-midnight for hour durations pelzflorian (Florian Pelz)

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).