Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GMT+5 or GMT-5

76 views
Skip to first unread message

Nasir Kamal

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
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??

Nasir

--
Solaris IS user friendly... It's just selective about who its friends
are.

Andy Platt

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
GMT + 5. The trick is to think what the time is at, say noon GMT on a
winter's day (no daylight savings). In London it's 12 O'Clock (obviously GMT
+0); in Washington, DC it's 7 am (that's five hours behind or GMT - 5); in
Karachi (assuming it really is five hours difference from London) it's 5 pm
(GMT + 5).

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...

Subramanian Sivakumar

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
obviously GMT +5, the simplest logic is anything to the East of GMT gets a +
and anything to the West of GMT gets a - ( minus ).

- Shiva

Chris Thompson

unread,
Sep 14, 2000, 3:00:00 AM9/14/00
to
In article <39C0E3D5...@cyber.net.pk>,

Nasir Kamal <nas...@cyber.net.pk> 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??

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

Ed F. de Guzman

unread,
Sep 15, 2000, 3:00:00 AM9/15/00
to
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.

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??
>

Casper H.S. Dik - Network Security Engineer

unread,
Sep 15, 2000, 3:00:00 AM9/15/00
to
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

"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.

Joerg Schilling

unread,
Sep 18, 2000, 3:00:00 AM9/18/00
to
In article <39C227B5...@kodak.com>,

Ed F. de Guzman <efgu...@kodak.com> wrote:
>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.

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

0 new messages