Date: Mon, 29 Oct 2007 01:35:08 +0700 From: Eugene Grosbein <eugen@kuzbass.ru> To: Holger Kipp <hk@alogis.com> Cc: stable@freebsd.org Subject: Re: date manupulation strangeness Message-ID: <20071028183508.GA25172@svzserv.kemerovo.su> In-Reply-To: <20071028182011.GA89664@intserv.int1.b.intern> References: <20071028174832.GA21847@svzserv.kemerovo.su> <20071028182011.GA89664@intserv.int1.b.intern>
index | next in thread | previous in thread | raw e-mail
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). > > That's last second of Summer time in this time zone. > > > > # LC_ALL=C TZ=Asia/Krasnoyarsk date -f %s $unixtime > > Sun Oct 28 02:59:59 KRAT 2007 > > > > That's an hour later after the switch from Summer time, > > but how can it be? It is a bug? > > I haven't checked, but usually during switch from summer > to winter time, you change the clock back from 03:00 to > 02:00, so you have the same hour twice. > > So you have 02:59:59 summer time and then you have > (instead of 03:00:00) 02:00:00 winter time a second > later, so one hour later you end up with 02:59:59 again. Yes, but "02:59:59 KRAT" is one hour (minus one second) later than "02:00:00 KRAT", the latter equals to "03:00:00 KRAST", so the first invocation of 'date' command shows time an hour before time the second invocation shows. However, unixtime is the same. That bothers me, something is wrong. Eugenehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071028183508.GA25172>
