unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de>
To: 33892@debbugs.gnu.org
Subject: bug#33892: guix package --list-generations uses UTC and time-at-midnight for hour durations
Date: Fri, 28 Dec 2018 10:31:20 +0100	[thread overview]
Message-ID: <20181228093120.dufnb4o5py7o4mvl@pelzflorian.localdomain> (raw)

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

                 reply	other threads:[~2018-12-28  9:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181228093120.dufnb4o5py7o4mvl@pelzflorian.localdomain \
    --to=pelzflorian@pelzflorian.de \
    --cc=33892@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).