From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 31 05:10:20 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2F5716A4CE for ; Sat, 31 Jan 2004 05:10:20 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CABA843D53 for ; Sat, 31 Jan 2004 05:10:19 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i0VDAJFR020351 for ; Sat, 31 Jan 2004 05:10:19 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i0VDAJIc020350; Sat, 31 Jan 2004 05:10:19 -0800 (PST) (envelope-from gnats) Date: Sat, 31 Jan 2004 05:10:19 -0800 (PST) Message-Id: <200401311310.i0VDAJIc020350@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Danijel Tasov Subject: Re: bin/62134: strange date -v results X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Danijel Tasov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2004 13:10:21 -0000 The following reply was made to PR bin/62134; it has been noted by GNATS. From: Danijel Tasov To: Edwin Groothuis Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/62134: strange date -v results Date: Sat, 31 Jan 2004 14:07:53 +0100 On Sat, Jan 31, 2004 at 01:30:43PM +1100, Edwin Groothuis wrote: > When the date is adjusted to a specific value that doesn't > actually exist (for example March 26, 1:30 BST 2000 in the > Europe/London timezone), the date will be silently adjusted > forwards in units of one hour until it reaches a valid time. > When the date is adjusted to a specific value that occurs > twice (for example October 29, 1:30 2000), the resulting > timezone will be set so that the date matches the earlier > of the two times. > > Loop i=2: > step 1. current date is 2004-01-31 > step 2. -v2004y: set current year to 2004, date will become 2004-01-31 > step 3. -v2m: set current month to 2, date will become 2004-02-31 > Unfortunatly this date doesn't exist, so it takes the next > best value and date will become 2004-03-01. > step 4. -v17d: set current day to 17, date will become 2004-03-17 Thank you for your answer. My mistake was, that I assumed that the execution of all -v flags is atomic. I've read the quoted paragraph from date(1), but I would never come to the idea, that the -v flags are executed one after another. Can somebody close this PR please? -DaTa- -- Jabber: data@jabber.pilgerer.org ICQ: 84074839 e-Mail: dt@vosat.de http://wiki.pilgerer.org/ - Die Kommunikations- und Kooperations- | () ASCII plattform fuer Unix-Fans und alle die es werden wollen. Macht mit! | /\ RIBBON # "zieh deinen xterm groesser und fertig..." - Spaceelk