Nasir
--
Solaris IS user friendly... It's just selective about who its friends
are.
Andy.
--
I'm not really here - it's just your warped imagination.
"Nasir Kamal" <nas...@cyber.net.pk> wrote in message
news:39C0E3D5...@cyber.net.pk...
- Shiva
Use
TZ=GMT-5 doesn't use a zoneinfo file (prints zone name as GMT)
or TZ=:GMT+5 uses a zoneinfo file (prints zone name as GMT-5)
or TZ=:Etc/GMT-5 same as previous
As for the logic, I'm not sure I can face explaining it other than
muttering "Posix! Posix!" under my breath...
But at least it's easy to work out what the effect would be of changing
TZ, as you just have to set the environment variable locally, e.g.
$ TZ=GMT+5 date
Thu Sep 14 10:12:42 GMT 2000
$ # Oops, thats not right
$ TZ=GMT-5 date
Thu Sep 14 20:12:56 GMT 2000
$ # Thats better...
before putting it in /etc/default/init.
Actually, you shouldn't really be using any of the above, but one of the
following:
Best: Use "zic /usr/share/lib/zoneinfo/asia" to generate the "Asia"
subdirectory of zoneinfo (this isn't populated by default in
a Solaris installation), and then use
TZ=Asia/Karachi
Second-best: If you aren't worried about getting times before 1951 right,
and as Pakistan has been running at a constant offset from GMT since
then (how we who have to put up with Daylight Saving Time envy you!)
you could use
TZ=PKT-5
This is the same as GMT-5 but will print the zone name as PKT.
Chris Thompson
Email: cet1 [at] cam.ac.uk
Chris clarified what really is going on inside Solaris.
Solaris TZ logic works in reverse - if you are East of GMT the TZ file
has to have TZ=GMT-EastTimeDiff, and vice-versa with West of GMT:
TZ=GMT+WestTimeDiff.
I think we should ask Solaris or Posix designers why this is so.
Ed
Nasir Kamal wrote:
> I am in Karachi/ Pakistan, GMT+5, what should I put in Solaris box,
> GMT+5 or GMT-5 ?? What is the logic behind the answer??
>
"Ed F. de Guzman" <efgu...@kodak.com> writes:
>Andy and Subramanian addressed the real world logic behind the TIME zone.
>Chris clarified what really is going on inside Solaris.
>Solaris TZ logic works in reverse - if you are East of GMT the TZ file
>has to have TZ=GMT-EastTimeDiff, and vice-versa with West of GMT:
>TZ=GMT+WestTimeDiff.
>I think we should ask Solaris or Posix designers why this is so.
POSIX; all POSIX compliant systems should work like that; traditional Olson
code got it wrong.
Whether this is in reverse? If you read it as "+/- the time at GMT", then
yes. If you read it as "timezone before/after GMT" it makes perfect sense.
But perhaps it was so they could give Americans positive timezones :-)
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
It seems that the reason is that POSIX is US dominated and US people cannot
stand the fact that their TZ should be negative.
--
EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
j...@cs.tu-berlin.de (uni) If you don't have iso-8859-1
schi...@fokus.gmd.de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix