Re: Timezone GMT+2 and Date behavior
The sun still rises from the east in our part of the globe:) The definition is straightforward: "specifies the time value to be added to the LOCAL TIME to get Coordinated Universal Time (UTC).". The "official" reference is the local time while the "street" reference is UTC (GMT). So, "correct" representation is IST - 2 == UTC while most of us use UTC + 2 = IST - Original Message - From: "Nadav Har'El" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 30, 2002 10:56 AM Subject: Re: Timezone GMT+2 and Date behavior > On Wed, Oct 30, 2002, [EMAIL PROTECTED] wrote about "Timezone GMT+2 and Date behavior": > > I set the same timezone GMT+2 in three different machines, running the following O/S: > > (note that you usually use "XYZ+2", where XYZ is the name you're going to > call the timezone; Calling it "GMT" is valid, but confusing) > > > in all the three machines, and suprisingly, the UTC time in Linux and Solaris 8 is two hours MORE then the GMT+2 time. > > The Tru64 results with correct values (UTC time is two hours LESS then the GMT+2 time). > > The Linux and Solaris behavior you describe is correct. > > GMT+2 is two hours west of UTC, i.e., UTC is two hours more than it. > This is exactly what is described in the manual says (see tzset(3)): > >"... The offset string immediately follows std and specifies the time > value to be added to the local time to get Coordinated Universal Time > (UTC). The offset is positive if the local time zone is west of the Prime > Meridian and negative if it is east." > > This is the way I always remember it being it on UNIX; West of England (e.g., > the USA) was positive offsets, east (e.g., Israel) was negative. > > If you were looking for Israeli time, you meant to use "GMT-2", not GMT+2. > > I don't know why Tru64 gave you the opposite behavior... > > > -- > Nadav Har'El| Wednesday, Oct 30 2002, 24 Heshvan 5763 > [EMAIL PROTECTED] |- > Phone: +972-53-245868, ICQ 13349191 |He who has more is not happier than he > http://nadav.harel.org.il |who wants less. > > = > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] > = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Timezone GMT+2 and Date behavior
On Wed, Oct 30, 2002, Oleg Goldshmidt wrote about "Re: Timezone GMT+2 and Date behavior": > "Nadav Har'El" <[EMAIL PROTECTED]> writes: > > > This is the way I always remember it being it on UNIX; West of > > England (e.g., the USA) was positive offsets, east (e.g., Israel) > > was negative. > > The confusion is, apparently, due to the fact that the normal time > reporting lists time as UTC + offset, with the offset positive to > the *East* of Prime Meridian: > > $ date +%z > +0200 > $ date > Wed Oct 30 11:27:21 IST 2002 > $ date -u > Wed Oct 30 09:27:24 UTC 2002 I never thought about that before. Yeah, it's really confusing :( -- Nadav Har'El| Wednesday, Oct 30 2002, 24 Heshvan 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |You do not need a parachute to skydive. http://nadav.harel.org.il |You only need one to skydive twice. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Timezone GMT+2 and Date behavior
"Nadav Har'El" <[EMAIL PROTECTED]> writes: > This is the way I always remember it being it on UNIX; West of > England (e.g., the USA) was positive offsets, east (e.g., Israel) > was negative. The confusion is, apparently, due to the fact that the normal time reporting lists time as UTC + offset, with the offset positive to the *East* of Prime Meridian: $ date +%z +0200 $ date Wed Oct 30 11:27:21 IST 2002 $ date -u Wed Oct 30 09:27:24 UTC 2002 -- Oleg Goldshmidt | [EMAIL PROTECTED] First binary search algorithm - J. Mauchly, 1946 First correct binary search algorithm - D.H.Lehmer, 1960 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: Timezone GMT+2 and Date behavior
On Wed, Oct 30, 2002, [EMAIL PROTECTED] wrote about "Timezone GMT+2 and Date behavior": > I set the same timezone GMT+2 in three different machines, running the following O/S: (note that you usually use "XYZ+2", where XYZ is the name you're going to call the timezone; Calling it "GMT" is valid, but confusing) > in all the three machines, and suprisingly, the UTC time in Linux and Solaris 8 is >two hours MORE then the GMT+2 time. > The Tru64 results with correct values (UTC time is two hours LESS then the GMT+2 >time). The Linux and Solaris behavior you describe is correct. GMT+2 is two hours west of UTC, i.e., UTC is two hours more than it. This is exactly what is described in the manual says (see tzset(3)): "... The offset string immediately follows std and specifies the time value to be added to the local time to get Coordinated Universal Time (UTC). The offset is positive if the local time zone is west of the Prime Meridian and negative if it is east." This is the way I always remember it being it on UNIX; West of England (e.g., the USA) was positive offsets, east (e.g., Israel) was negative. If you were looking for Israeli time, you meant to use "GMT-2", not GMT+2. I don't know why Tru64 gave you the opposite behavior... -- Nadav Har'El| Wednesday, Oct 30 2002, 24 Heshvan 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |He who has more is not happier than he http://nadav.harel.org.il |who wants less. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Timezone GMT+2 and Date behavior
Hi, I set the same timezone GMT+2 in three different machines, running the following O/S: Tru64 4.0D, Solaris 8, Linux RH 7.2 In order to get the time difference between the GMT+2 time and the UTC time, I just typed the "date" and "date -u" in all the three machines, and suprisingly, the UTC time in Linux and Solaris 8 is two hours MORE then the GMT+2 time. The Tru64 results with correct values (UTC time is two hours LESS then the GMT+2 time). Tru64 results: #date Tue Oct 29 19:09:22 GMT+0200 2002 #date -u Tue Oct 29 17:09:27 UTC 2002 Linux results: #date Tue Oct 29 19:09:40 GMT+2 2002 #date -u Tue Oct 29 21:09:45 UTC 2002 What is the reason for such differences?. Are there different UTC standards for Linux and Tru64? Any suggestion is appreciated. Avi Koski