From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 04 19:36:03 2010 Received: (at submit) by debbugs.gnu.org; 4 Nov 2010 23:36:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PE9Le-0007fn-Ps for submit@debbugs.gnu.org; Thu, 04 Nov 2010 19:36:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PE9Kv-0007f4-NK for submit@debbugs.gnu.org; Thu, 04 Nov 2010 19:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE9PF-0004i0-OZ for submit@debbugs.gnu.org; Thu, 04 Nov 2010 19:39:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:50348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE9PF-0004hw-Me for submit@debbugs.gnu.org; Thu, 04 Nov 2010 19:39:45 -0400 Received: from [140.186.70.92] (port=57565 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PE9PE-0002lY-IS for bug-coreutils@gnu.org; Thu, 04 Nov 2010 19:39:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PE9PD-0004hT-EY for bug-coreutils@gnu.org; Thu, 04 Nov 2010 19:39:44 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:41881) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PE9PD-0004gn-9z for bug-coreutils@gnu.org; Thu, 04 Nov 2010 19:39:43 -0400 Received: by pxi12 with SMTP id 12so492452pxi.0 for ; Thu, 04 Nov 2010 16:39:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.178.10 with SMTP id a10mr1019219wff.391.1288913976996; Thu, 04 Nov 2010 16:39:36 -0700 (PDT) Received: by 10.142.126.2 with HTTP; Thu, 4 Nov 2010 16:39:36 -0700 (PDT) Date: Thu, 4 Nov 2010 19:39:36 -0400 Message-ID: Subject: Date command bug From: Raymond Pete To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary=000e0cd2dbb6beb22e049442ab85 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 04 Nov 2010 19:36:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) --000e0cd2dbb6beb22e049442ab85 Content-Type: text/plain; charset=ISO-8859-1 Hi, I believe I have come across a small bug in the date command when daylight savings time is in the process of being run. Example: date --set "7 NOV 2010" -->Sun Nov 7 00:00:01 EDT 2010 date --date="+1 day" -->Sun Nov 7 23:00:40 EST 2010 It would appear in Eastern time zone case there is a small 2 hour window of error here whereby the date command has set the zone before it is actually supposed to be set. I have seen this with all time zone shifts. Noticed first last weekend when BST went to GMT. Could be a known bug.. if so, sorry to trouble you guys. Best Regards, Ray --000e0cd2dbb6beb22e049442ab85 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=A0
I believe I have come across a small bug in the date command whe= n daylight savings time is in the process of being run.

Example:
=A0=A0 =A0date --set "7 NOV 2010"
<= div>=A0-->Sun Nov =A07 00:00:01 EDT 2010

=A0=A0 =A0date --date=3D"+1 day"
--= >Sun Nov =A07 23:00:40 EST 2010


= It would appear in Eastern time zone case there is a small 2 hour window of= error here whereby the date command has set the zone before it is actually= supposed to be set. I have seen this with all time zone shifts. Noticed fi= rst last weekend when BST went to GMT.

Could be a known bug.. if so, sorry to trouble you guys= .

Best Regards,

Ray
=


--000e0cd2dbb6beb22e049442ab85-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 04 23:52:07 2010 Received: (at 7331) by debbugs.gnu.org; 5 Nov 2010 03:52:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PEDLT-0000t4-61 for submit@debbugs.gnu.org; Thu, 04 Nov 2010 23:52:07 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PEDLR-0000sg-Hx for 7331@debbugs.gnu.org; Thu, 04 Nov 2010 23:52:06 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 37BE621361; Thu, 4 Nov 2010 21:56:34 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 22ADF2DCE3; Thu, 4 Nov 2010 21:56:34 -0600 (MDT) Date: Thu, 4 Nov 2010 21:56:34 -0600 From: Bob Proulx To: Raymond Pete Subject: Re: bug#7331: Date command bug Message-ID: <20101105035634.GA15915@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 7331 Cc: 7331@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) Raymond Pete wrote: > I believe I have come across a small bug in the date command when daylight > savings time is in the process of being run. Thank you for the report. But what you are describing looks like an incorrect expectation of behavior to me. > date --set "7 NOV 2010" > -->Sun Nov 7 00:00:01 EDT 2010 You don't need to actually set the date and mess with the system clock. Just use --date and have date interpret the date string. It would make for a more reliable example. > date --date="+1 day" > -->Sun Nov 7 23:00:40 EST 2010 I assume that EDT and EST here are US/Eastern DST and US/Eastern standard time? Better to use 'date -R' to produce numeric values that are not ambiguous. $ TZ=US/Eastern date -R -d "Sun, 07 Nov 2010 00:00:01 -0400 +1 day" Sun, 07 Nov 2010 23:00:01 -0500 > It would appear in Eastern time zone case there is a small 2 hour window of > error here whereby the date command has set the zone before it is actually > supposed to be set. I have seen this with all time zone shifts. Noticed > first last weekend when BST went to GMT. I don't understand. "7 NOV 2010" doesn't have a time associated with it and so the zero hour (midnight) is used. $ zdump -v US/Eastern | grep 2010 US/Eastern Sun Nov 7 05:59:59 2010 UTC = Sun Nov 7 01:59:59 2010 EDT isdst=1 gmtoff=-14400 US/Eastern Sun Nov 7 06:00:00 2010 UTC = Sun Nov 7 01:00:00 2010 EST isdst=0 gmtoff=-18000 November 7th at midnight is still within daylight savings time. Then you say "+1 day" which adds 24 hours to the current clock time and produces a time that is 24 hours later but *after* US/Eastern has changed to standard time. "Spring forward and Fall back." If you were expecting it to be midnight on the next day then you have forgotten that there is an extra hour inserted in the Fall when the clocks are turned back one hour. > Could be a known bug.. if so, sorry to trouble you guys. I see no bug here. Please explain if I missed something. See also this reference for more information: http://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-working-right_002e Bob From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 16:56:18 2010 Received: (at 7331-done) by debbugs.gnu.org; 5 Nov 2010 20:56:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PETKc-0000us-75 for submit@debbugs.gnu.org; Fri, 05 Nov 2010 16:56:18 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PETKa-0000un-PB for 7331-done@debbugs.gnu.org; Fri, 05 Nov 2010 16:56:17 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 742B721361; Fri, 5 Nov 2010 15:00:47 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 6D01A2DCE3; Fri, 5 Nov 2010 15:00:47 -0600 (MDT) Date: Fri, 5 Nov 2010 15:00:47 -0600 From: Bob Proulx To: Raymond Pete Subject: Re: bug#7331: Date command bug Message-ID: <20101105210047.GA27961@hysteria.proulx.com> References: <20101105035634.GA15915@hysteria.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101105035634.GA15915@hysteria.proulx.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 7331-done Cc: 7331-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) Raymond Pete wrote: > Thanks for the info Bob :-) I figured I missed something here. > I see running my jobs just after midnight is probably not best. I like running those types of calculations either at 12 noon or using UTC. Then the DST issues are avoided. I also like using the 'date -R' format since it is RFC standard (used in email and news) and unambiguous about timezones. Otherwise I like using "%F %T %z" for being compact, unambiguous, and sorts nicely. I will go ahead and close the bug with this email then. > Appreciate all the work you guys do! The team enjoys hearing those nice words. :-) Bob From unknown Fri Aug 15 02:04:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Dec 2010 12:24:04 +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