From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" 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 Message-ID: <20181228093120.dufnb4o5py7o4mvl@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gconK-00017I-53 for bug-guix@gnu.org; Fri, 28 Dec 2018 04:51:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gconG-0003me-Pt for bug-guix@gnu.org; Fri, 28 Dec 2018 04:51:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:45531) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gconG-0003m7-IL for bug-guix@gnu.org; Fri, 28 Dec 2018 04:51:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gconG-0000f3-Dp for bug-guix@gnu.org; Fri, 28 Dec 2018 04:51:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([208.118.235.92]:52621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcomt-0008Ra-MB for bug-guix@gnu.org; Fri, 28 Dec 2018 04:50:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcoUF-0006Xu-Jm for bug-guix@gnu.org; Fri, 28 Dec 2018 04:31:45 -0500 Received: from pelzflorian.de ([5.45.111.108]:40436 helo=mail.pelzflorian.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gcoUF-0006Wp-8X for bug-guix@gnu.org; Fri, 28 Dec 2018 04:31:23 -0500 Received: from pelzflorian.localdomain (unknown [5.45.111.108]) by mail.pelzflorian.de (Postfix) with ESMTPSA id EAE24360077 for ; Fri, 28 Dec 2018 10:31:20 +0100 (CET) Content-Disposition: inline List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 33892@debbugs.gnu.org Hello Guix, I would expect guix package --list-generations=3D=E2=80=A6h to display generations from the past =E2=80=A6 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=3D"Dec 15 2018 13:04:16" +%s 1544875456 $ date +%s 1545989113 $ guix package --list-generations=3D$(((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