From unknown Sat Jun 21 10:34:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40958 <40958@debbugs.gnu.org> To: bug#40958 <40958@debbugs.gnu.org> Subject: Status: date command give current time zone regardless of seconds since epoch requested. Reply-To: bug#40958 <40958@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:34:28 +0000 retitle 40958 date command give current time zone regardless of seconds sin= ce epoch requested. reassign 40958 coreutils submitter 40958 GNAT severity 40958 normal tag 40958 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 06:25:59 2020 Received: (at submit) by debbugs.gnu.org; 29 Apr 2020 10:25:59 +0000 Received: from localhost ([127.0.0.1]:42481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTjug-0007oH-Oy for submit@debbugs.gnu.org; Wed, 29 Apr 2020 06:25:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:38074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTiHe-00050i-4C for submit@debbugs.gnu.org; Wed, 29 Apr 2020 04:41:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55936) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTiHR-0002bN-L2 for bug-coreutils@gnu.org; Wed, 29 Apr 2020 04:41:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTiGY-0007C1-W7 for bug-coreutils@gnu.org; Wed, 29 Apr 2020 04:41:21 -0400 Received: from mailgate.bgcomp.co.uk ([81.187.35.205]:48771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTiGX-00079p-Re for bug-coreutils@gnu.org; Wed, 29 Apr 2020 04:40:26 -0400 Received: from mailgate.bgcomp.co.uk (www.bgcomp.co.uk [IPv6:2001:8b0:ca:2::fd]) by mailgate.bgcomp.co.uk (Postfix) with ESMTP id BE9963B6A for ; Wed, 29 Apr 2020 09:40:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bgcomp.co.uk; s=bgcomp.co.uk; t=1588149619; bh=SoaFBLQp9X+zOSy4Bx/zl8E0KlGpth1kdDcgeNnusfE=; h=From:To:Subject:Date; b=VUrSSdZMXY6kCgZHg3x4gOXoONt89g8VVQmkPTfwWRu3X501uy4oPoeTleNbOg5t9 7VpFMIQEfZPidjYZYiUzl4mDByLRMxJVIjTBd14Gro9+cFcnan0e1tLgiFid4MeT6k r2859VSF0kT7FpBTN9DcWDvMPhoy5StFE49lTqL4= X-Clacks-Overhead: GNU Terry Pratchett From: GNAT To: bug-coreutils@gnu.org Subject: date command give current time zone regardless of seconds since epoch requested. Date: Wed, 29 Apr 2020 09:40:19 +0100 Message-ID: <2600504.zDVlYcn2ED@eth7> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: pass client-ip=81.187.35.205; envelope-from=gnat@1.gnat.bgcomp.co.uk; helo=mailgate.bgcomp.co.uk X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 04:40:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 81.187.35.205 X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 29 Apr 2020 06:25:56 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) I am going to hazard a guess and say this is the expected behaviour, but I cannot find anything though goog. The date command has a number of switches, one of which is -d where you give it the number of seconds since epoch, as in "date -d@1234" or "date --date @1234". Additionally, you can get it to return as any string you want to, as in "date -d@1234 "+%c %z %Z" Both return "Thu Jan 1 01:20:34 BST 1970" or "Thu Jan 1 01:20:34 +0100 BST 1970" for the UK. /etc/localtime is set to /usr/share/zoneinfo/Europe/London. That's wrong, it should give "Thu Jan 1 00:20:34 1970 +0000 GMT". After all, in January, the UK is not in daylight saving time at the beginning of January. It therefore gives you the current daylight saving time status, rather than what it should be at the time requested. I assume currently, this will give erroneous results for any requests in daylight saving. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 06:42:32 2020 Received: (at submit) by debbugs.gnu.org; 29 Apr 2020 10:42:32 +0000 Received: from localhost ([127.0.0.1]:42511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTkAh-0008Gj-Nb for submit@debbugs.gnu.org; Wed, 29 Apr 2020 06:42:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:45766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTkAX-0008GH-QN for submit@debbugs.gnu.org; Wed, 29 Apr 2020 06:42:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42404) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTkAW-0001VX-Lx for bug-coreutils@gnu.org; Wed, 29 Apr 2020 06:42:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTkAU-0003RQ-My for bug-coreutils@gnu.org; Wed, 29 Apr 2020 06:42:19 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:56710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTkAU-0003Qj-4I for bug-coreutils@gnu.org; Wed, 29 Apr 2020 06:42:18 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Bw7T17VZz1qsbV; Wed, 29 Apr 2020 12:42:12 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Bw7S6YLJz1qqlF; Wed, 29 Apr 2020 12:42:12 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Oyd48k9YF40a; Wed, 29 Apr 2020 12:42:11 +0200 (CEST) X-Auth-Info: oFyPbowom1LNv9Z1+l44BgxRaldMeNDPhMbi/0K72paxau9sxfsczrDsElefAFWO Received: from igel.home (ppp-46-244-172-55.dynamic.mnet-online.de [46.244.172.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 29 Apr 2020 12:42:11 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id E01092C0C61; Wed, 29 Apr 2020 12:42:10 +0200 (CEST) From: Andreas Schwab To: GNAT via GNU coreutils Bug Reports Subject: Re: bug#40958: date command give current time zone regardless of seconds since epoch requested. References: <2600504.zDVlYcn2ED@eth7> X-Yow: -- I can do ANYTHING ... I can even ... SHOPLIFT!! Date: Wed, 29 Apr 2020 12:42:10 +0200 In-Reply-To: <2600504.zDVlYcn2ED@eth7> (GNAT via GNU coreutils Bug Reports's message of "Wed, 29 Apr 2020 09:40:19 +0100") Message-ID: <87blna7ev1.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=212.18.0.9; envelope-from=whitebox@nefkom.net; helo=mail-out.m-online.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/29 06:42:13 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 212.18.0.9 X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit Cc: 40958@debbugs.gnu.org, GNAT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) >From : A further inquiry during 1966–1967 led the government of Harold Wilson to introduce the British Standard Time experiment, with Britain remaining on GMT+1 throughout the year. This took place between 27 October 1968 and 31 October 1971, when there was a reversion to the previous arrangement. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 29 12:48:36 2020 Received: (at control) by debbugs.gnu.org; 29 Apr 2020 16:48:36 +0000 Received: from localhost ([127.0.0.1]:44439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpsy-00058q-JB for submit@debbugs.gnu.org; Wed, 29 Apr 2020 12:48:36 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTpsw-00058b-4o for control@debbugs.gnu.org; Wed, 29 Apr 2020 12:48:35 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C0349160059 for ; Wed, 29 Apr 2020 09:48:27 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YMkgOV_958eI for ; Wed, 29 Apr 2020 09:48:27 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1CEE6160066 for ; Wed, 29 Apr 2020 09:48:27 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sKmlSAg_J0Zk for ; Wed, 29 Apr 2020 09:48:27 -0700 (PDT) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id F0C50160059 for ; Wed, 29 Apr 2020 09:48:26 -0700 (PDT) Subject: Re: bug#40958: date command give current time zone regardless of seconds since epoch requested. To: control@debbugs.gnu.org References: <2600504.zDVlYcn2ED@eth7> <87blna7ev1.fsf@igel.home> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRV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aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <3dfe9a8f-fe91-15cf-15a3-2172063bd800@cs.ucla.edu> Date: Wed, 29 Apr 2020 09:48:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <87blna7ev1.fsf@igel.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 40958 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 30 01:30:46 2020 Received: (at 40958) by debbugs.gnu.org; 30 Apr 2020 05:30:46 +0000 Received: from localhost ([127.0.0.1]:45201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jU1mX-000783-Pw for submit@debbugs.gnu.org; Thu, 30 Apr 2020 01:30:46 -0400 Received: from havoc.proulx.com ([96.88.95.61]:33034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jU1mW-00077o-Au; Thu, 30 Apr 2020 01:30:44 -0400 Received: from joseki.proulx.com (localhost [127.0.0.1]) by havoc.proulx.com (Postfix) with ESMTP id EF79B524; Wed, 29 Apr 2020 23:30:35 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proulx.com; s=dkim2048; t=1588224636; bh=i8iOV2OQST/U2YPIHKCfwSf87cOfOZMM8PqtG8UzxtY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qze+X9CFV8xIC1VlLUxFHJPrLgB67YYbBjjXklpQ7D9ID+zKZWjEsN+vx69pb7MCj iSZczsH7NQokYUMuDeBd1byqccvtM3z/fqvOD/dEE+8hsWUfOmWxKar3SE2Lmc8oHh JBgraJXsJ2Yi8K+hAKGrwPwTZ7G6UPv8bM8iIuHJRzZqy7T7atPN71Zs1cArDIquwx +rHp/hOcy3/HQ2+7j+abfN1lKc9IzwCIeT0YIAdbveeoNWihtDW3EK9fZeJ8fHpgnU oDv6i7WudbYTliqxTC7L+Lr0KwThWMOVxlp5GwA3OhmRLXEHBb6JBn576IXw0nzcmW iGwkLR24Al9HA== Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id C4CD221151; Wed, 29 Apr 2020 23:30:35 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id B1DF02DC8E; Wed, 29 Apr 2020 23:30:35 -0600 (MDT) Date: Wed, 29 Apr 2020 23:30:35 -0600 From: Bob Proulx To: GNAT Subject: Re: bug#40958: date command give current time zone regardless of seconds since epoch requested. Message-ID: <20200429231201519201921@bob.proulx.com> References: <2600504.zDVlYcn2ED@eth7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2600504.zDVlYcn2ED@eth7> X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40958 Cc: 40958@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tag 40958 + notabug close 40958 thanks GNAT via GNU coreutils Bug Reports wrote: > I am going to hazard a guess and say this is the expected behaviour, > but I cannot find anything though goog. The FAQ gives the recipe to figure these types of problems out. https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e And for the timezone and date in question. zdump -v Europe/London | grep 1970 ...no output... That would be a little confusing. So let's look at it with a pager such as less. Browse and find the years of interest. zdump -v Europe/London | less ... Europe/London Sun Feb 18 01:59:59 1968 UT = Sun Feb 18 01:59:59 1968 GMT isdst=0 gmtoff=0 Europe/London Sun Feb 18 02:00:00 1968 UT = Sun Feb 18 03:00:00 1968 BST isdst=1 gmtoff=3600 Europe/London Sat Oct 26 22:59:59 1968 UT = Sat Oct 26 23:59:59 1968 BST isdst=1 gmtoff=3600 Europe/London Sat Oct 26 23:00:00 1968 UT = Sun Oct 27 00:00:00 1968 BST isdst=0 gmtoff=3600 Europe/London Sun Oct 31 01:59:59 1971 UT = Sun Oct 31 02:59:59 1971 BST isdst=0 gmtoff=3600 Europe/London Sun Oct 31 02:00:00 1971 UT = Sun Oct 31 02:00:00 1971 GMT isdst=0 gmtoff=0 ... And therefore it is of course as Andreas Schwab wrote. "This took place between 27 October 1968 and 31 October 1971, ..." An interesting footnote of history! The date command uses the Time Zone Database for this information. The database is typically updated by the operating system software distribution upon which GNU date is run. The The source of the database is available here. https://www.iana.org/time-zones GNU date is operating upon the data from that database. That database is updated often as it is a global compilation of every act of governance and must be updated as the timezone rules are updated. In the Debian and derivative software distributions I know this is packaged in the 'tzdata' package. > The date command has a number of switches, one of which is -d where you give it the number of seconds since epoch, as in "date -d@1234" or "date --date @1234". > > Additionally, you can get it to return as any string you want to, as in "date -d@1234 "+%c %z %Z" > > Both return "Thu Jan 1 01:20:34 BST 1970" or "Thu Jan 1 01:20:34 +0100 BST 1970" for the UK. > > /etc/localtime is set to /usr/share/zoneinfo/Europe/London. > > That's wrong, it should give "Thu Jan 1 00:20:34 1970 +0000 GMT". > > After all, in January, the UK is not in daylight saving time at the beginning of January. And yet there it was! By an Act of Governance daylight saving time was in effect at that time! No one is safe when the government is in session. :-) > It therefore gives you the current daylight saving time status, > rather than what it should be at the time requested. > > I assume currently, this will give erroneous results for any > requests in daylight saving. Because date appears to be operating correctly I am closing this bug ticket. But please we welcome that any discussion may continue in the bug ticket. Bob From unknown Sat Jun 21 10:34:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 May 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator