From unknown Fri Jul 11 01:41:19 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#35109 <35109@debbugs.gnu.org> To: bug#35109 <35109@debbugs.gnu.org> Subject: Status: date 'tomorrow' bug Reply-To: bug#35109 <35109@debbugs.gnu.org> Date: Fri, 11 Jul 2025 08:41:19 +0000 retitle 35109 date 'tomorrow' bug reassign 35109 coreutils submitter 35109 Maximilian Glei=C3=9Fner severity 35109 normal tag 35109 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 15:16:41 2019 Received: (at submit) by debbugs.gnu.org; 2 Apr 2019 19:16:42 +0000 Received: from localhost ([127.0.0.1]:41712 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBOtj-0002si-KM for submit@debbugs.gnu.org; Tue, 02 Apr 2019 15:16:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBJOs-0000PL-Hc for submit@debbugs.gnu.org; Tue, 02 Apr 2019 09:24:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:49072) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBJOn-0002Ft-AP for submit@debbugs.gnu.org; Tue, 02 Apr 2019 09:24:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBJOm-0000jo-Ak for bug-coreutils@gnu.org; Tue, 02 Apr 2019 09:24:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBJOl-0002F2-FC for bug-coreutils@gnu.org; Tue, 02 Apr 2019 09:24:20 -0400 Received: from outdoor.onevision.de ([212.77.172.51]:44275) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hBJOk-00024p-VL for bug-coreutils@gnu.org; Tue, 02 Apr 2019 09:24:19 -0400 Received: from sanders.onevision.de (moonrace [212.77.172.62]) by outdoor.onevision.de (8.15.2/8.13.7/ROSCH/DDB) with ESMTP id x32DO0T1002652 for ; Tue, 2 Apr 2019 15:24:05 +0200 To: bug-coreutils@gnu.org MIME-Version: 1.0 Subject: date 'tomorrow' bug X-KeepSent: 84A03621:90D07F5F-C12583D0:0048B454; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP10 SHF81 April 28, 2018 Message-ID: From: =?ISO-8859-1?Q?Maximilian_Glei=DFner?= Date: Tue, 2 Apr 2019 15:23:55 +0200 X-MIMETrack: Serialize by Router on DE1/Onevision(Release 10.0.1|November 29, 2018) at 02.04.2019 15:24:05, Serialize complete at 02.04.2019 15:24:05 Content-Type: multipart/alternative; boundary="=_alternative 004999EAC12583D0_=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 212.77.172.51 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 02 Apr 2019 15:16:39 -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: -0.3 (/) This is a multipart message in MIME format. --=_alternative 004999EAC12583D0_= Content-Type: text/plain; charset="US-ASCII" Hi, I have encountered a possible bug with the date function using both SuSE LEAP 15.0 and SuSE 10.2. This bug occurs when asking date for 'tomorrow' when there is a daylight saving timechange. Note: The machine is located in the GMT+1 timezone, and daylight savings time changed on 31.03.2019 02:00 jumping to 03:00 To replicate the bug: date -s "2019-03-30 23:XX" #where XX is any valid minute, e.g. 23:35 date -d 'tomorrow' #expected output: 2019-03-31 23:XX actual output: 2019-04-01 00:XX I am aware you recommend not using local timezones and daylight savings time, but I still think this should/could be implemented better. Regards M.Gleissner --=_alternative 004999EAC12583D0_= Content-Type: text/html; charset="US-ASCII" Hi,

I have encountered a possible bug with the date function using both SuSE LEAP 15.0 and SuSE 10.2.
This bug occurs when asking date for 'tomorrow' when there is a daylight saving timechange.

Note: The machine is located in the GMT+1 timezone, and daylight savings time changed on 31.03.2019 02:00 jumping to 03:00

To replicate the bug:
date -s "2019-03-30 23:XX"                        #where XX is any valid minute, e.g. 23:35
date -d 'tomorrow'                                #expected output: 2019-03-31 23:XX
actual output: 2019-04-01 00:XX

I am aware you recommend not using local timezones and daylight savings time, but I still think this should/could be implemented better.


Regards
M.Gleissner --=_alternative 004999EAC12583D0_=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 20:15:47 2019 Received: (at 35109) by debbugs.gnu.org; 3 Apr 2019 00:15:47 +0000 Received: from localhost ([127.0.0.1]:41883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBTZD-0003z8-HJ for submit@debbugs.gnu.org; Tue, 02 Apr 2019 20:15:47 -0400 Received: from ishtar.tlinx.org ([173.164.175.65]:45698 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBTZA-0003yy-DZ for 35109@debbugs.gnu.org; Tue, 02 Apr 2019 20:15:45 -0400 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id x330FeEC020361; Tue, 2 Apr 2019 17:15:42 -0700 Message-ID: <5CA3FB15.8090803@tlinx.org> Date: Tue, 02 Apr 2019 17:15:17 -0700 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: =?UTF-8?B?TWF4aW1pbGlhbiBHbGVpw59uZXI=?= Subject: Re: bug#35109: date 'tomorrow' bug References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35109 Cc: 35109@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 (-) On 4/2/2019 6:23 AM, Maximilian Gleißner wrote: > Hi, > > I have encountered a possible bug with the date function using both SuSE > LEAP 15.0 and SuSE 10.2. > This bug occurs when asking date for 'tomorrow' when there is a daylight > saving timechange. > > Note: The machine is located in the GMT+1 timezone, and daylight savings > time changed on 31.03.2019 02:00 jumping to 03:00 > > To replicate the bug: > date -s "2019-03-30 23:XX" #where XX is any valid > minute, e.g. 23:35 > date -d 'tomorrow' #expected output: > 2019-03-31 23:XX > actual output: 2019-04-01 00:X I suppose it would depend on your definition of tomorrow. I don't know if it has a locale specific definition. Is "24 hours from now", or is it the whole day from midnight->midnight, or is it the same time "X" hours past midnight. You are using a "same time tomorrow" which, by definition would be the same time with date+1, but if you use 24 hours ahead, or same # hours past midnight, or the entire period from day-start to day-end, you wouldn't get the answer you expected. I don't know if 'tomorrow' is supposed have meaning of same-time, but more 1 day ahead of now, which would tend toward 24 hours. I'm not saying I agree or disagree, just that in my mind, the word tomorrow seems a bit vaguely defined, but turning to google and asking for define tomorrow, I get 1) on the day after today, or the day after today. In both cases it refers to 'the day' not a particular number of hours in the future. The fact that you can type in tomorrow at all is a bit surprising given the common definition which never refers to a specific time, but the entirety. Even so, the answer you show, intuitively seems off -- but I don't know that our intuition knows about Daylight savings time. I'd be more likely to suggest that tomorrow shouldn't return a time at all, but only a date, which would be the current data incremented by one. Somewhere along the line it looks like someone thought to "compute" tomorrow as if it was some exact quantity 24 hours in the future -- which doesn't fit any of the most frequently used definitions I see. I.e. expected output: 2019-04-01 (no time). It's always the case that people need to specify a time when referring to yesterday, today or tomorrow. Tomorrow wouldn't be 24 hours ahead of now anymore than today means 'now'. Just my 2 cents. There's probably some inane definition of tomorrow defined by POSIX, but of course, you'd need to specify which POSIX version you are referring to as there is more than one definition of the since they do change over time. > I am aware you recommend not using local timezones and daylight savings > time, but I still think this should/could be implemented better. > ---- Who is 'you' in this context, Gnu, POSIX, SuSE or ??? Seems odd to tell people not to use something that most computers likely do automatically these days. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 02 22:09:08 2019 Received: (at 35109) by debbugs.gnu.org; 3 Apr 2019 02:09:08 +0000 Received: from localhost ([127.0.0.1]:41926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBVKt-0006oa-PE for submit@debbugs.gnu.org; Tue, 02 Apr 2019 22:09:08 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:42113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hBVKo-0006nz-Ud; Tue, 02 Apr 2019 22:09:03 -0400 Received: by mail-pf1-f176.google.com with SMTP id r15so7304759pfn.9; Tue, 02 Apr 2019 19:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=XOw05yRVJiGNWspjqTN+gJ1u+4d2aBupk9+PZtcnCvk=; b=ATNaZnBaTPilUji0V/S4w6h5LnqS7Rowq1QaaVqZA9k7p2F9Gh50tzaB4Dhw0UBHHT qGc2x7i69j/l0YlnlUANnsXCP0BQXlwnyRLXn+MPdZrgtgHxNLRZcfK2FoL6M5gVkLnU 7KM1131XLe6Rlg5+6bCVMO6uML56rMuEtHM2Ujyu8VOXbtzTaacya+zp9qyEOMD1ycai /GIQNsNVojQPlZf6K8whpnhRfTHhaMBNNijVov+3wBKqb8af/9qoHDKPl97//tjAlsJH Iw5wrMhGxILTl2dL7aNYzd57KD2l5SR/jTSbhPGG4s/QbQktoITWNxcK0YoD63iRn5fw oAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XOw05yRVJiGNWspjqTN+gJ1u+4d2aBupk9+PZtcnCvk=; b=SMl7CwCJbasV0gBJT6NMdANIQODZppLoUugcLkMjKHdfqEGYiGpBmSfdegSqa1U63Z i6HC55cQ1nNW2H0sfAUMNggxnevkyil5mgINJ2UUZnSqcpQK7Gjx+Crqdu15gC4rUNWt 0FyVwa6Pi4iYquu4Ssvix2zNAAIycL8ZQXe1SlmqEY3ZRdCAIrdUCbm6W/whhJnx19G5 0obnlro1H6x/o5yZ3tI+rR3QLwBTYakt9ccRwdaevMfNyUqrrA+3ZhtUkKFz04jLCM+o ONLGL6sArZ+Qas1gAWPlIHifd7xBGiUqknaYqpPeMNngWh6W0CkIBUnzWbcE6DcLi5PH vjLg== X-Gm-Message-State: APjAAAV5ut+hnxw2Zouryr9sSDyUanIegFz15A7b1UCz3RKvAYJI708Z lGtRypnjn/7hux8Rb/G6eVNAOD2B X-Google-Smtp-Source: APXvYqy2fifUj912xOYTnElLm73EfgDURnOR+bZg/V5xYD+4qIpk8kB82kQhRFFY1wT30EXSAfLOeg== X-Received: by 2002:a62:424f:: with SMTP id p76mr280606pfa.141.1554257336528; Tue, 02 Apr 2019 19:08:56 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id m16sm34600425pfi.29.2019.04.02.19.08.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 19:08:55 -0700 (PDT) Subject: Re: bug#35109: date 'tomorrow' bug To: =?UTF-8?Q?Maximilian_Glei=c3=9fner?= , 35109@debbugs.gnu.org References: From: Assaf Gordon Message-ID: <4bfc6618-1e71-776e-ced5-2f955ec097ae@gmail.com> Date: Tue, 2 Apr 2019 20:08:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35109 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 (-) tags 35109 notabug close 35109 stop Hello, On 2019-04-02 7:23 a.m., Maximilian Gleißner wrote: > I have encountered a possible bug with the date function using both SuSE > LEAP 15.0 and SuSE 10.2. > This bug occurs when asking date for 'tomorrow' when there is a daylight > saving timechange. This is not a bug, just a usage issue. > Note: The machine is located in the GMT+1 timezone, and daylight savings > time changed on 31.03.2019 02:00 jumping to 03:00 Exactly - and 'date' adjust the time accordingly by adding an hour if the timezone was crossed. (technically it's not date(1) but glibc, if that matters). > To replicate the bug: > date -s "2019-03-30 23:XX" #where XX is any valid > minute, e.g. 23:35 > date -d 'tomorrow' #expected output: > 2019-03-31 23:XX > actual output: 2019-04-01 00:XX Note that 'date' printed one more critical piece of information: $ date Sat Mar 30 23:10:41 GMT 2019 $ date -d tomorrow Mon Apr 1 00:10:43 BST 2019 The timezone shifted from GMT to BST - and the time was adjusted accordingly by adding an hour, and crossing into April 1st. Similarly, if you waited 5 hours from 2019-03-30 23:35 it would be 5am, not 4am - and date needs to account for that: $ date Sat Mar 30 23:18:47 GMT 2019 $ date -d "+5 hours" Sun Mar 31 05:18:49 BST 2019 > I am aware you recommend not using local timezones and daylight savings > time, but I still think this should/could be implemented better. > The GNU coreutils team does not recommend such a thing at all. In fact, team member Prof. Paul Eggert is the editor maintainer of the Time Zone database ( https://en.wikipedia.org/wiki/Tz_database ) which is used by almost every operating system and many programming languages ( https://en.wikipedia.org/wiki/Tz_database#Use_in_software_systems ). There is a strong recommendation however, to specify "noon" (12pm) whenever doing date arithmetics, exactly to avoid DST issues. See: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#The-date-command-is-not-working-right_002e $ date Sat Mar 30 23:24:08 GMT 2019 $ date -d "12pm tomorrow" Sun Mar 31 12:00:00 BST 2019 On the other hand, it is the European Union that wants to do away with daylight saving time: https://www.bbc.com/news/world-europe-45366390 To learn more about the inner-working of GNU date and similar issues with DST, please see past discussions here: https://bugs.gnu.org/8357 https://bugs.gnu.org/11101 https://bugs.gnu.org/18159 https://bugs.gnu.org/30795 As such, I'm marking this as "not a bug", but discussion can continue by replying to this thread. regards, - assaf From unknown Fri Jul 11 01:41:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 May 2019 11:24:03 +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