From owner-freebsd-questions@FreeBSD.ORG Wed Feb 16 09:49:26 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C53921065694 for ; Wed, 16 Feb 2011 09:49:26 +0000 (UTC) (envelope-from freebsdlists@bsdunix.ch) Received: from conversation.bsdunix.ch (ns1.bsdunix.ch [82.220.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 829EC8FC16 for ; Wed, 16 Feb 2011 09:49:26 +0000 (UTC) Received: from conversation.bsdunix.ch (localhost [127.0.0.1]) by conversation.bsdunix.ch (Postfix) with ESMTP id C2DD83269 for ; Wed, 16 Feb 2011 09:49:24 +0000 (UTC) X-Virus-Scanned: by amavisd-new at mail.bsdunix.ch Received: from conversation.bsdunix.ch ([127.0.0.1]) by conversation.bsdunix.ch (conversation.bsdunix.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id SJIXpu9dO+ms for ; Wed, 16 Feb 2011 09:49:24 +0000 (UTC) Received: from ernie.mlan.solnet.ch (ernie.mlan.solnet.ch [212.101.1.20]) by conversation.bsdunix.ch (Postfix) with ESMTPA id 42BCC3266 for ; Wed, 16 Feb 2011 09:49:24 +0000 (UTC) Message-ID: <4D5B9DA4.4080200@bsdunix.ch> Date: Wed, 16 Feb 2011 10:49:24 +0100 From: Thomas User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.14) Gecko/20110207 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Problem with setting timezone in shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 09:49:26 -0000 Hello Maybe someone can explain this. My localtime zone is Europe/Zurich (same as Berlin, Madrid, it's CET). IMHO this is an equivalent of UTC+1 Lets try this on my shell. The Systemclock is set to UTC: thomas@bert:~> date Wed Feb 16 09:12:00 UTC 2011 Set localtime: thomas@bert:~> setenv TZ 'Europe/Zurich' thomas@bert:~> date Wed Feb 16 10:12:43 CET 2011 <- Correct, my localtime Now set it back to UTC: thomas@bert:~> setenv TZ 'UTC' thomas@bert:~> date Wed Feb 16 09:13:04 UTC 2011 Let's try setting my localtime with UTC+1: thomas@bert:~> setenv TZ 'UTC+1' thomas@bert:~> date Wed Feb 16 08:13:23 UTC 2011 <- It's wrong. The time went back for 1 hour instead of adding 1 hour. Removing one hour works: thomas@bert:~> setenv TZ 'UTC-1' thomas@bert:~> date Wed Feb 16 10:14:11 UTC 2011 <- correct time. But thats not correct. I never had problems with UTC+1 settings in other programs like db, php, irssi ...) My System: FreeBSD bert.mlan.solnet.ch 8.2-RC3 FreeBSD 8.2-RC3 #0: Sun Jan 30 06:28:31 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 tcsh default shell with not setting. Regards, Thomas Vogt