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.
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.
Just change the ~/.cshrc file as below.
for example:
#setenv TZ US/Mountain
setenv TZ Taiwan
Hope this will help.
for example:
#setenv TZ US/Mountain
setenv TZ Taiwan
Hope this will help.
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.
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,
TZ=eet-02eest-03,M3.5.0/2,
(this is an example from QNX)
If you notice I'v change the month and hour for the second hour modification.
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
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.
'%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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know why this link doesn't copy,
try copying it to the address on your browser.
try copying it to the address on your browser.
for example:
#setenv TZ US/Mountain
setenv TZ Taiwan
Hope this will help.