Operating System - HP-UX
1819791 Members
3413 Online
109607 Solutions
New Discussion юеВ

How to set correct time zone for GMT +4 without DST

 
SOLVED
Go to solution
Aleksandr Fedorov
New Member

How to set correct time zone for GMT +4 without DST

I have a system which is installed in GMT +4 timezone without DST use (Georgia, Tbilisi).
I have HP-UX 11.11 and need to set timezone correctly.
Unfortunately I failed to find the timezone for my country, but as far as I know UAE uses the same ruled (GMT+4 without DST), but I didn't found UAE neither.

I have been using set_parms timezone script to set the time zone.

Could you please help me to correctly identify the needed entty for /etc/TIMEZONE and /usr/lib/tztab

Should I edit them manually and simply add needed timezone? What might be the behaviour if ORACLE system installed on this machine?
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: How to set correct time zone for GMT +4 without DST

Shalom,

Honestly I'd run set_parms and take the timezone option and go GMT+4

So there isn't a time zone for Tiblisi Georgia, nor is there one for Jerusalem Israel, we manage.

Unix calculates time based on the number of seconds since January 1, 1970. All the time zone settings do is impact the display of time so when its three p.m. where you are sitting thats what the computer displays.

Oracle has an internal time recorder for transactions that works well again with a raw number, no time zone specific information. The only thing you can do to make Oracle very unhappy is to roll back the time on your system while oracle is running. That will crash it hard and with near 100% frequency.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matti_Kurkela
Honored Contributor
Solution

Re: How to set correct time zone for GMT +4 without DST

GMT+4 and no DST used? That's easy.

Simply set the TZ environment variable to "WST-4". In this case, the letters WST are "just a decoration": the number (-4) and the absence of a DST identifier tells the OS and the applications everything they need to know about the timezone. The sign of the number is inverted because that's how the TZ variable is defined in the POSIX standards.

If you don't like the "WST" identifier, pick your own letters if you wish; just avoid re-using an existing timezone identifier to avoid confusion.

The letters in the value of the TZ environment variable are important only if you the DST rules are used: then the TZ value must match exactly to one of the rule blocks in /usr/lib/tztab.

You need to modify /usr/lib/tztab only if your country starts to use DST rules some day, and even then only if HP won't provide a patch with the correct information.

As long as your system's idea of the UTC time is correct, Oracle should work fine. After setting the TZ variable, compare the outputs of "date" and "date -u" to make sure the system's conversion routines between the UTC time and local time work correctly.

Remember that the native internal representation of time in HP-UX is always UTC time. Any output that uses your local time zone is the result of a conversion from UTC to your local timezone.

Oracle has several data types: TIMESTAMP converts everything to UTC for storage and back to your current timezone for output. The TIMESTAMP WITH TIME ZONE data type holds both the time value and the timezone information.
See:
http://www.psoug.org/reference/timestamp.html

If your system had a wrong idea about UTC before changing the TZ variable, any data stored using the TIMESTAMP data type would now be shown to be incorrect (because the original conversion error in storing the data is no longer "cancelled out" by another error in converting it back for output). Any data stored using TIMESTAMP WITH TIME ZONE of course won't change.

MK
MK
Aleksandr Fedorov
New Member

Re: How to set correct time zone for GMT +4 without DST

Thank you to HP experts fro provided advices, which solved my problem.