DST change on Compaq Tru64


 
Thread Tools Search this Thread
Operating Systems HP-UX DST change on Compaq Tru64
# 8  
Old 10-18-2011
Code:
echo $TZ
TZ: Undefined variable.

Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.
# 9  
Old 10-18-2011
So undefined...
# 10  
Old 10-18-2011
so what I have to do will be:

1) delete the /etc/zoneinfo/localtime link as follows:
Code:
# rm /etc/zoneinfo/localtime

2) Create a new /etc/zoneinfo/localtime link, specifying the target time zone as follows:
Code:
# ln -s /etc/zoneinfo/Asia/Qatar /etc/zoneinfo/localtime

???

Last edited by md1982; 10-18-2011 at 09:21 AM..
# 11  
Old 10-18-2011
And hop Qatar don't change their mind in the future...
Have you any HP support? If so look at this link that explains how it works:
https://h20566.www2.hp.com/portal/si...tte.cachetoken

P.S. Don't forget to use code tags for your code and data...
# 12  
Old 10-18-2011
Unfortunately I dont have any HP support.
What do you mean with code tags?
# 13  
Old 10-18-2011
To keep the forums high quality for all users, take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)

Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.
This User Gave Thanks to vbe For This Post:
# 14  
Old 10-18-2011
Hope HP will forgive me...

Quote:
Title: HP Tru64 UNIX Operating Systems - TZ Environment Variable Uses Old DST Rules
Document ID: emr_na-c01411278-1
Submitted Date: Mon Mar 24 08:19:33 GMT 2008
Last Modified Date: Thu Apr 10 12:15:02 GMT 2008


HP Tru64 UNIX Operating Systems - TZ Environment Variable Uses Old DST Rules
ISSUE:

On a Tru64 UNIX system prior to V5.1B-4, which is updated with the Daylight Saving Time (DST) rules adopted by the U.S. and Canada in 2007, setting the TZ environment variable to a System-V style timezone such as EST5EDT causes the shell to use the old rules. As such, during the periods that observe DST only under the new rules, setting the TZ variable may incorrectly show the system as running standard time. This will occur from the second Sunday in March until the first Sunday in April, and again from the last Sunday in October until the first Sunday in November.

The issue is illustrated by the following example from a system in the U.S. Eastern timezone:

The zdump command verifies that the EST5EDT timezone is updated with the new DST rules (starting in March, ending in November):


# zdump -v :EST5EDT | grep 2008
:EST5EDT Wed Mar 19 08:31:30 2008 EDT [this will show the current time]
:EST5EDT Sun Mar 9 06:59:59 2008 GMT = Sun Mar 9 01:59:59 2008 EST isdst=0 gmtoff=-18000
:EST5EDT Sun Mar 9 07:00:00 2008 GMT = Sun Mar 9 03:00:00 2008 EDT isdst=1 gmtoff=-14400
:EST5EDT Sun Nov 2 05:59:59 2008 GMT = Sun Nov 2 01:59:59 2008 EDT isdst=1 gmtoff=-14400
:EST5EDT Sun Nov 2 06:00:00 2008 GMT = Sun Nov 2 01:00:00 2008 EST isdst=0 gmtoff=-18000

During one of the periods at issue, the date command incorrectly shows the system as being on standard time if TZ is set to a timezone such as EST5EDT . For example:


# ksh
# date Tue Mar 18 12:38:37 EDT 2008 <-- correctly shows system at EDT

# TZ=EST5EDT date Tue Mar 18 11:38:42 EST 2008 <-- incorrectly shows system at EST

# TZ=:EST5EDT date Tue Mar 18 12:38:49 EDT 2008 <-- with slightly different syntax (leading colon in timezone name), correctly shows system at EDT.

SOLUTION:

This issue is corrected in Tru64 UNIX V5.1B-4. For earlier systems, various workarounds are available.

The issue is caused by the way in which the shell interprets the TZ environment variable. Tru64 UNIX conforms to the POSIX standards listed in the reference page standards(5). In particular, ISEE Std 1003.1 , Section 8 describes the specifications for environment variables. The 2004 edition can be found online. Click here to view the "IEEE Std 1003.1, 2004 Edition" (http://www.opengroup.org/onlinepubs/...bd_chap08.html) Non-HP site .

The TZ variable is listed in Section 8.3, Other Environment Variables . Two forms of specification are allowed:


:characters
or:
std offset dst offset, rule

In the first form, the interpretation is implementation dependent. The Tru64 UNIX implementation is described in the reference page for timezone(3). This states:

[Tru64 UNIX] If TZ has the colon-pathname format (Smilieathname), the characters following the colon specify the pathname of a tzfile(4) format file from which to read the time conversion information. A pathname beginning with a slash (/) represents an absolute pathname; otherwise, the pathname is relative to the system time conversion information directory /etc/zoneinfo.

What this means is that if TZ is specified as something like :US/Eastern or :EST5EDT , the shell will read the DST rules from the timezone files /etc/zoneinfo/US/Eastern or /etc/zoneinfo/EST5EDT . These timezone files are built from the source files in /etc/zoneinfo/sources .

This why the leading-colon specification works.

Why does the format without the colon not work with the new DST rules? This has to do with the expansion of the second TZ format in the POSIX standard. The full form of this format for TZ is:


stdoffset[dst[offset][,start[/time],end[/time]]]

This means that the full specification should be something like the following:


TZ=EST5EDT4,M3.2.0,M11.1.0

This specifies TZ completely for the new rules, changing on the second Sunday in March and the first Sunday in November.

However, if the optional fields are omitted (as when TZ is specified as just EST5EDT ), the handling of those fields is not specified by the POSIX standard, and is therefore implementation dependent. In Tru64 UNIX, the default handling in this case is to use the U.S. DST rules that are in force at the time the software is released. For any version prior to V5.1B-4, this is equivalent to the following specification, which matched the old DST rules that were in force when those versions were released:


TZ=EST5EDT4,M4.1.0,M10.5.0

As such, versions earlier than V5.1B-4 pick up this definition as a default behavior of the shell, regardless of whether the timezone source files have been updated. For these earlier versions, there are a variety of workarounds:

Specify the TZ environment variable with a leading colon (TZ=:EST5EDT rather than TZ=EST5EDT ). This will cause the shell to read the EST5EDT definition from the timezone database, rather than interpreting it according to the POSIX standard.

Alternatively, specify the full form of the TZ variable as defined by the POSIX standard. For example:


export TZ=EST5EDT4,M3.2.0,M11.1.0

If it is not possible to use one of the previously mentioned alternative formats, a third alternative is to update the default rules used by the shell in Tru64 UNIX version 5. This is possible because version 5 defines the POSIX default rules in a file, /etc/zoneinfo/posixrules .

In version 4 and earlier, the rules are hard-coded in the C library, so this workaround does not apply to those versions. To update the rules, simply replace the system copy of /etc/zoneinfo/posixrules with a copy from a system running V5.1B-4 or later. The shell will immediately start using the new rules; no reboot is necessary.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Change Time Zone to UTC without DST

Hello AIX friends, We have timezone settings on our AIX 6.1 boxes set to Europe/London. How can I change it to UTC timezone with Daylight saving disabled. After running "smit chtz_user" I don't see UTC option in the listing. Please advise. TIA (3 Replies)
Discussion started by: prvnrk
3 Replies

2. AIX

Bug in AIX 6.1/7.1 Time Zone DST Change -again

Hi Everyone Just wanted to share with you that IBM AIX is having again problem with Summer Time Shift.. IBM Possible Action Required: System time may not change properly at DST start/end dates on AIX 7.1 and AIX 6.1 - United States For me it means some additional overtimes in the... (0 Replies)
Discussion started by: gito
0 Replies

3. Linux

DST Time Change for positive timezones not working

I was doing timezone and DST testing which is required for some of my products Here is the strange behaviour i observed First i did set the timezone to PST 2010 (which is less than GMT basically negative timezone) zdump -v /etc/localtime |grep 2010 /etc/localtime Sun Mar 14 09:59:59... (0 Replies)
Discussion started by: ravindra1103
0 Replies

4. Linux

OS for Compaq Presario 1685

Hi, Trying to install a small OS to run this old laptop. Compaq Presario 1685, circa '98 Processor: AMD K6-2 380 MHz Data Bus Speed: 66 MHz Ram Installed 32 MB moduled Hard Drive: 4.3 GB DVD-ROM Burned in a CD “PUPPY-4.3beta1-k2.6.25.16-v423-SCSI”, tried to boot with it several times BUT... (7 Replies)
Discussion started by: nichos
7 Replies

5. Shell Programming and Scripting

DST Change For Australia

Hello , We are investigating an issue from a customer from Western Australia related to DST change on 25 th March. The customer in Australia has the below settings for Time Zone. The System is Solaris 9. TZ=Australia/NSW CMASK=022 We are trying to reproduce the problem in our local... (1 Reply)
Discussion started by: Mohammed
1 Replies

6. UNIX for Dummies Questions & Answers

Help In Compaq Tru64 UNix

Hi, I am new to UNIX. I need help in working with Compaq-UX TRU64 OS. How It work FTP Server? ANd MAil Server? and I have apach pprogram project and it work as HTTP Server. Also I need how can setup a new version of progrm on UNix like mozilla and adobe reader etc........... Thank... (3 Replies)
Discussion started by: svuad
3 Replies

7. SCO

compaq smart array 532

Trying to install Sco openserver on HP Proliant with this scsi controller but no scsi devices detected. Boot controller is set as the smart array 532 but SCSI diags do not detect any SCSI boot devices during boot sequence Any help appreciated (2 Replies)
Discussion started by: farmacy
2 Replies

8. UNIX for Dummies Questions & Answers

tru64 ip change

I'm trying to change the IP address of a Tru64 v4.0e box. The ifconfig command is not working. I am using the following format (which does not return an error): ifconfig tu1 xxx.xxx.xxx.xxx netmask 255.255.255.0 The xxx* indicates the new IP. After entering that command, an ifconfig -a command... (1 Reply)
Discussion started by: bscottiii
1 Replies

9. Filesystems, Disks and Memory

Compaq Scsi

Howto make Debian GNU/Linux install boot on a Compaq DeskPro XL 590 with Compaq SCSI diskdrive? The problem is that Compaq's Scsi controller sems to be odd. help please :) (0 Replies)
Discussion started by: Esaia
0 Replies

10. Programming

HPUX and Compaq problem-urgent

Hi All Following is the lines of code which simply makes a structure of 1 bit member and 7 bit is unused.Then the structure is initialised with char pointer.The output on HPUX(BIG Endian) and Compaq(Little Endian) are different.On HPUX it gives zero and Compaq it gives 1. I never thought that the... (7 Replies)
Discussion started by: Shobhit
7 Replies
Login or Register to Ask a Question