1753694 Members
6345 Online
108799 Solutions
New Discussion юеВ

Re: Time Zone

 
kamal_15
Regular Advisor

Time Zone

hi all
i have problem with my country localtime
when i echo $TZ
it display EGY-2EGYDST (which mean two houres than UTC)
but
when run command date
it display time with three houres than UTC
please help
thnak you
6 REPLIES 6
Jim Walls
Trusted Contributor

Re: Time Zone

Check this site to see why this is happening:

http://www.timeanddate.com/worldclock/timezone.html?n=53


Also, ensure you have the latest /usr/lib/tztab patch:

HP-UX 11.11 PHCO_39172
HP-UX 11.23 PHCO_39173
HP-UX 11.31 PHCO_39174

These may not help in this particular situation because I couldn't see any references to Egypt in the patch history.

However, refer also to this posting:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1449587

Dennis Handly
Acclaimed Contributor

Re: Time Zone

>it display EGY-2EGYDST (which mean two hours than UTC) but when run command date it display time with three hours than UTC

It's working correctly. You don't have EGY-2EGYDST in /usr/lib/tztab and so it thinks you are in DST according to the rules in the USA.

You can also use TZ=EGY-2 to set it to two hours ahead.
V. Nyga
Honored Contributor

Re: Time Zone

Hi,

>it display EGY-2EGYDST (which mean two houres than UTC)
Why do you think that 'it means two houres than UTC'?
It just means that for daylight saving it's less than EGY.
Where comes -2EGYDST from?
DST is 1 hour ...

In Jim's link you can see that EGYDST is +3 hours in UTC offset - and that's what you read, right?

What does 'date' shows?
EGYDST or 2EGYDST?

V.
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: Time Zone

>V. Nyga: Why do you think that 'it means two houres than UTC'?

(Well two hours ahead of UTC.)

>It just means that for daylight saving it's less than EGY.

Actually the absolute value is more on the wrong side of the world. :-)

>In Jim's link you can see that EGYDST is +3 hours in UTC offset - and that's what you read, right?

But DST time in that thread was canceled last night. But in the USA, is goes until Nov 7.
$ TZ=EET-2EEST dst.pl
Thu Apr 29 23:59:59 EET 2010 --> Fri Apr 30 01:00:00 EEST 2010
Thu Sep 30 23:59:59 EEST 2010 --> Thu Sep 30 23:00:00 EET 2010
$ TZ=EET-2EEST date
Fri Oct 1 12:33:01 EET 2010

>What does 'date' shows?

EGYDST of course, since it appears broken.
But in my system, it is perfect and has EET. :-)
V. Nyga
Honored Contributor

Re: Time Zone

Hi Dennis,

but he claims that it's 3 hours than the expected 2 hours

So:
'Actually the absolute value is more on the wrong side of the world.'
can't be right.

And - when he posted his thraed it was still EEST. Right?

Kamal - I would like to see an actual output of 'date'.
Also, why don't you use the official time zone EET (-1EEST) ?

V.
*** Say 'Thanks' with Kudos ***
Dennis Handly
Acclaimed Contributor

Re: Time Zone

>Jim: Check this site to see why this is happening:
http://www.timeanddate.com/worldclock/timezone.html?n=53

Wow, 4 changes!

>V. Nyga: but he claims that it's 3 hours than the expected 2 hours
>So: 'Actually the absolute value is more, on the wrong side of the world.'
>can't be right.

I meant the DST offset of 3 is more than the standard time of 2, on the wrong side of the world.

>when he posted his thread it was still EEST. Right?

It sure seems like it:
$ a.out EET-2EEST EGT-2EGTDST
Sep 30, 2010 20:02:17 GMT
Sep 30, 2010 23:02:17 EEST
Sep 30, 2010 23:02:17 EGTDST

So kamal's tztab could be fine, he needs to check again.

>why don't you use the official time zone EET (-1EEST)?

Because with 4 changes in a year, Egypt needs their own zone?