First tnx for fast replay.
I have few more questions, first is how can I check if TZ environment variable is defined or not, and why is important that is not defined.
I have found this in man pages
"Setting Time Zone Information
Code:
The /etc/zoneinfo/localtime link can be changed by the system administrator
to any file in the /etc/zoneinfo directory.
For example, the following command changes the local time zone to be con-
sistent with the city of New York on the American continent:
# ln -sf /etc/zoneinfo/America/New_York /etc/zoneinfo/localtime"
That is why I have asked is that correct?
But in suggested from you man zic there is other example so Im not sure:
EXAMPLES
Code:
The following examples show how you use the time zone commands and data-
bases. You must be logged in as superuser (root) to use the following com-
mands:
1. Use a procedure similar to the following if a system is relocated to a
new timezone. This example uses Australian time zones and shows what
you need to do when relocating a host system from from Brisbane
(Queensland) to Sydney (New South Wales):
a. Verify the value of the link file /etc/zoneinfo/localtime as fol-
lows:
# ls -l /etc/zoneinfo/localtime
lrwxrwxrwx 1 root system 18 Mar 19 17:05 localtime -> \
./Australia/Queensland
b. If necessary, use the zdump command to verify transitions in the
target time zone as follows:
#zdump -c 2001 -v Australia/NSW
Australia/NSW Fri Dec 13 20:45:52 1901 GMT = Fri Dec 13 15:45:52 1901 EST \
isdst=0 gmtoff=-18000
Australia/NSW Sat Dec 14 20:45:52 1901 GMT = Sat Dec 14 15:45:52 1901 EST \
isdst=0 gmtoff=-18000
Australia/NSW Sun Mar 31 06:59:59 1918 GMT = Sun Mar 31 01:59:59 1918 EST \
isdst=0 gmtoff=-18000
Australia/NSW Sun Mar 31 07:00:00 1918 GMT = Sun Mar 31 03:00:00 1918 EWT \
isdst=1 gmtoff=-14400
Australia/NSW Sun Oct 27 05:59:59 1918 GMT = Sun Oct 27 01:59:59 1918 EWT \
isdst=1 gmtoff=-14400
.
.
.
(output truncated)
c. Delete the /etc/zoneinfo/localtime link as follows:
# rm /etc/zoneinfo/localtime
d. Create a new /etc/zoneinfo/localtime link, specifying the target
time zone as follows:
# ln -s /etc/zoneinfo/Australia/NSW localtime
#ls -l localtime
should now be: localtime -> ./Australia/NSW
check the transitions have changed using zdump
Verify the new link as follows:
# ls -l /etc/zoneinfo/localtime
lrwxrwxrwx 1 root system 18 Mar 19 17:05 /etc/zoneinfo/localtime -> \
./Australia/NSW
e. Repeat the zdump command in Step b to verify transitions in the
target time zone.
2. The system time automatically changes for events such as Daylight Sav-
ings Time. These time transitions are stored in the /etc/zoneinfo
database. If necessary, you can verify and alter the rules that
specify when a system will automatically alter its time. This example
shows how you change the active /etc/zoneinfo file to include the
changes to Daylight Savings Time. (Such a change was mandated for the
2000 Olympics, moving the start date of Daylight Savings Time to
August 27th in 2000, rather than the expected date of October 29th.)
The example assumes that the system is located in Sydney, Australia:
a. Examine the active time zone setting as follows:
# ls -l /etc/zoneinfo/localtime
lrwxrwxrwx root system 18 Mar 19 17:05 etc/zoneinfo/localtime -> \
./Australia/NSW
b. Use the zdump command to verify the time transitions for the
active time zone.
The zdump command prints transitions for every year since the
beginning of rules for the active timezone. Use the more command
or redirect (>) the output to a file so you can find the relevent
transition. Use the -c option to specify the year at which the
display output terminates. For example:
# zdump -c 2002 -v Australia/NSW
Australia/NSW Sat Oct 30 15:59:59 1999 GMT = Sun Oct 31 01:59:59 1999 EST \
isdst=0 gmtoff=36000
Australia/NSW Sat Oct 30 16:00:00 1999 GMT = Sun Oct 31 03:00:00 1999 EST \
isdst=1 gmtoff=39600
Australia/NSW Sat Mar 25 15:59:59 2000 GMT = Sun Mar 26 02:59:59 2000 EST \
isdst=1 gmtoff=39600
Australia/NSW Sat Mar 25 16:00:00 2000 GMT = Sun Mar 26 02:00:00 2000 EST \
isdst=0 gmtoff=36000
Australia/NSW Sat Oct 28 15:59:59 2000 GMT = Sun Oct 29 01:59:59 2000 EST \
isdst=0 gmtoff=36000
Australia/NSW Sat Oct 28 16:00:00 2000 GMT = Sun Oct 29 03:00:00 2000 EST \
isdst=1 gmtoff=39600
Each pair of lines for the same date and time shows a time tran-
sition. On Sun Oct 29 2000 immediately after 01:59:59 the time
changes to 03:00:00. This transition changes the local time from
Australian Eastern Standard Time (EST) to Daylight Savings Time
(DST). The value of the isdst field changes as follows:
+ 0 - Not Daylight Savings Time
+ 1 - Daylight Savings Time
The gmtoff field displays the offset from Greenwich Mean Time.
c. Display the contents of the /etc/zoneinfo database file for your
locale to find the rules for the local zone. In this case, it is
New South Wales:
# more /etc/zoneinfo/sources/australasia
.
.
# New South Wales
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule AN 1971 1985 - Oct lastSun 2:00s 1:00 -
Rule AN 1972 only - Feb 27 2:00s 0 -
Rule AN 1973 1981 - Mar Sun>=1 2:00s 0 -
Rule AN 1982 only - Apr Sun>=1 2:00s 0 -
Rule AN 1983 1985 - Mar Sun>=1 2:00s 0 -
Rule AN 1986 1989 - Mar Sun>=15 2:00s 0 -
Rule AN 1986 only - Oct 19 2:00s 1:00 -
Rule AN 1987 1999 - Oct lastSun 2:00s 1:00 -
Rule AN 1990 1995 - Mar Sun>=1 2:00s 0 -
Rule AN 1996 max - Mar lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Sydney 10:04:52 - LMT 1895 Feb
10:00 Aus EST 1971
10:00 AN EST
Zone Australia/Broken_Hill 9:25:48 - LMT 1895 Feb
10:00 - EST 1896 Aug 23
9:00 - CST 1899 May
9:30 Aus CST 1971
9:30 AN CST 2000
9:30 AS CST
<display truncated>
From this display, you find the rules that apply to the current
year. For the year 2000 the rules are as follows:
Rule AN 1996 max - Mar lastSun 2:00s 0 -
The other rules either end on a past year or apply only for the
year specified, as shown in the TO column. The entry max in the
TO column means that the rule applies from the year listed in the
FROM column and for all future years.
d. Assume that on the last Sunday of October in 2000, you must
change the time at 2:00 a.m. to be one hour more than the stan-
dard time (EST). On the last Sunday of March, you must change
the time at 3:00 a.m. to be the same as EST, turning the clock
back one hour when the previous rule was active. (In this exam-
ple, the 27th happened to be the last Sunday in August, making
the transition change less complicated.) The new rule that you
must add is as follows:
Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule AN 2000 only - Aug lastSun 2:00 1:00 -
e. To avoid corrupting the /etc/zoneinfo/sources/australasia data
file, copy it to a backup revision as follows:
# cp /etc/zoneinfo/sources/australasia \
/etc/zoneinfo/sources/australasia.orig
Then edit the file /etc/zoneinfo/sources/australasia with a text
editor to add the following line:
Rule AN 2000 only - Aug lastSun 2:00 1:00 -
f. You can now use the zic command to update the database with the
new transition rule as follows:
# /usr/sbin/zic /etc/zoneinfo/sources/australasia
g. Use the zdump command to verify the new transitions as follows:
# zdump -c 2002 -v Australia/NSW
.
.
.Australia/NSW Sat Aug 26 15:59:59 2000 GMT = Sun Aug 27 01:59:59 2000 \
EST isdst=0 gmtoff=36000
This truncated output indicates that the transition to Daylight
Savings Time moved from October 29 to August 27, as required.
Last edited by vbe; 10-18-2011 at 06:04 AM..
Reason: code tags
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)