From owner-freebsd-questions Wed Jul 19 10:27:04 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id KAA01836 for questions-outgoing; Wed, 19 Jul 1995 10:27:04 -0700 Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id KAA01830 for ; Wed, 19 Jul 1995 10:27:03 -0700 Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.3.6) id AA28659; Wed, 19 Jul 1995 13:26:51 -0400 Date: Wed, 19 Jul 1995 13:26:51 -0400 From: Garrett Wollman Message-Id: <9507191726.AA28659@halloran-eldar.lcs.mit.edu> To: Pete Shipley Cc: questions@FreeBSD.org Subject: time zone discrepancy In-Reply-To: <199507191705.KAA04160@merde.dis.org> References: <199507191705.KAA04160@merde.dis.org> Sender: questions-owner@FreeBSD.org Precedence: bulk < said: > I was writing some time zone calculations > and noticed a discrepancy in the way SunOS and FreeBSD handles > timezone information: > on Sunos the command: > env TZ=GMT date ; env TZ=GMT+1 date ; env TZ=GMT-1 date The syntax for the TZ environment variable changed in recent versions of the timezone library to comply with the POSIX definition. There are old-style zones available in the `Etc' directory: wollman@khavrinen(154)$ TZ=Etc/GMT date; TZ=Etc/GMT+1 date; TZ=Etc/GMT-1 date Wed Jul 19 17:21:47 GMT 1995 Wed Jul 19 16:21:47 GMT+1 1995 Wed Jul 19 18:21:47 GMT-1 1995 However, the use of these fake `zones' is strongly discouraged (which is why tzsetup doesn't give you an option to use them). You should pick the appropriate zone file based on the actual location for which you want to know the time: wollman@khavrinen(161)$ TZ=Europe/Stockholm date; TZ=Europe/London date; TZ=Atlantic/Azores date Wed Jul 19 19:25:28 MET DST 1995 Wed Jul 19 18:25:28 BST 1995 Wed Jul 19 17:25:28 ACT DST 1995 -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant