From owner-freebsd-stable@FreeBSD.ORG Sun Oct 28 21:15:41 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E1A116A421 for ; Sun, 28 Oct 2007 21:15:41 +0000 (UTC) (envelope-from hk@alogis.com) Received: from alogis.com (firewall.solit-ag.de [212.184.102.1]) by mx1.freebsd.org (Postfix) with ESMTP id 9E86013C4B7 for ; Sun, 28 Oct 2007 21:15:40 +0000 (UTC) (envelope-from hk@alogis.com) Received: from alogis.com (localhost [127.0.0.1]) by alogis.com (8.13.4/8.13.1) with ESMTP id l9SLFd3E093398; Sun, 28 Oct 2007 22:15:39 +0100 (CET) (envelope-from hk@alogis.com) Received: (from hk@localhost) by alogis.com (8.13.4/8.13.1/Submit) id l9SLFcWg093397; Sun, 28 Oct 2007 22:15:38 +0100 (CET) (envelope-from hk) Date: Sun, 28 Oct 2007 22:15:38 +0100 From: Holger Kipp To: Eugene Grosbein Message-ID: <20071028211538.GA92424@intserv.int1.b.intern> References: <20071028174832.GA21847@svzserv.kemerovo.su> <20071028182011.GA89664@intserv.int1.b.intern> <20071028183508.GA25172@svzserv.kemerovo.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071028183508.GA25172@svzserv.kemerovo.su> User-Agent: Mutt/1.4.2.1i Cc: stable@freebsd.org Subject: Re: date manupulation strangeness X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2007 21:15:41 -0000 On Mon, Oct 29, 2007 at 01:35:08AM +0700, Eugene Grosbein wrote: > On Sun, Oct 28, 2007 at 07:20:11PM +0100, Holger Kipp wrote: > > > > # unixtime=1193511599 > > > # LC_ALL=C TZ=Asia/Krasnoyarsk date -jr $unixtime > > > Sun Oct 28 02:59:59 KRAT 2007 > > Here it shows 'Sun Oct 28 02:59:59 KRAST 2007' really > (cut-n-paste error, mea culpa). Take a note of zone name, > KRAST stands for 'KRAsnoyarsk Summer Time' and > KRAT stands for 'KRAsnoyarsk Time' (winter one). ah, I see. I can reproduce it here as well: %setenv LC_ALL C %setenv TZ Asia/Krasnoyarsk %setenv unixtime 1193511599 %date -jr $unixtime Sun Oct 28 02:59:59 KRAST 2007 %date -jf $s $unixtime Sun Oct 28 02:59:59 KRAT 2007 %date -juf %s $unixtime Sat Oct 27 18:59:59 UTC 2007 %date -jur $unixtime Sat Oct 27 18:59:59 UTC 2007 Interestingly, if output is forced to be in UTC, both give the same results. Using unixtime 1193511600 instead, I get %date -jr $unixtime Sun Oct 28 02:00:00 KRAT 2007 %date -jf %s $unixtime Sun Oct 28 02:00:00 KRAST 2007 With unixtime < 1193509360 both return KRAST and with unixtime > 1193512959 both return KRAT. In between, one returns KRAST, the other KRAT or vice versa... Looks like one of the conversions is getting the summertime-flag wrong here. I have tested this here with 6.2-STABLE from May 20... Regards, Holger