Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Feb 2011 10:49:24 +0100
From:      Thomas <freebsdlists@bsdunix.ch>
To:        freebsd-questions@freebsd.org
Subject:   Problem with setting timezone in shell
Message-ID:  <4D5B9DA4.4080200@bsdunix.ch>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D5B9DA4.4080200>