Link to home
Start Free TrialLog in
Avatar of crisu
crisu

asked on

Seting/Changing Time Zone Information Programaticaly in Linux

I have to change TZ information under Linux.
I have to change the month, day and hour ...

I know where the files ar in the Linux system but I don't know how to change the information in them.

Tanks.
Avatar of qiang8
qiang8

Just change the ~/.cshrc file as below.

for example:

#setenv TZ US/Mountain
setenv TZ Taiwan

Hope this will help.
Just change the ~/.cshrc file as below.

for example:

#setenv TZ US/Mountain
setenv TZ Taiwan

Hope this will help.
Avatar of crisu

ASKER

Tanks for your answer.
I know how to do that.
The problem is to change the mont, day and hour for the first and second change of hour.
Something like this:
TZ=eet-02eest-03,M3.5.0/2,M9.5.0/2
TZ=eet-02eest-03,M3.5.0/2,M10.5.0/3
(this is an example from QNX)
If you notice I'v change the month and hour for the second hour modification.


Avatar of crisu

ASKER

Adjusted points from 50 to 70
Take a look at the (date) command. I think it will do what you want. Then to set your hardware clock (setclock) makes it whatever the date command set it to. RH6.1
Avatar of crisu

ASKER

I have to change it not to see it ...

'%z'
     RFC-822 style numeric time zone (e.g., -0600 or +0100), or nothing
     if no time zone is determinable.  This value reflects the
     _current_ time zone.  It isn't changed by the `--date' option.

`%Z'
     time zone (e.g., EDT), or nothing if no timezone is determinable.
     Note that this value reflects the _current_ time zone.  It isn't
     changed by the `--date' option.
http://x35.deja.com/[ST_rn=ps]/getdoc.xp?AN=602676096.7&context=954945577.2104164361&hitnum=47
ASKER CERTIFIED SOLUTION
Avatar of Ted22
Ted22

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't know why this link doesn't copy,
try copying it to the address on your browser.