$ date
$ Mon Apr 21 16:20:25 UTC 2003
I'm in Philadelphia (New York time zone). I tried timeconfig
command, it didn't allow me to change UTC to EDT. Since you
can "date --utc" to set it to UTC format, I tend to believe
there must be some way to change it the other way besides a
reinstall. However, I couldn't find any clue from date man
page. Has anybody ever done it before? Thank you for your
attention.
-Donald Li
Dept. of Physics
Univ. of Penn.
# rm /etc/localtime
# ln -s /usr/share/zoneinfo/EST5EDT /etc/localtime
If, for some reason, you don't have root on this box, then
TZ=EST5EDT export TZ
in your shell.
I'm pretty sure the RH7.1 date manpage mentions both TZ and
/etc/localtime.
I have an out of the box install or Redhat 9.0. When I issue the date
command I see EDT:
[root@bd sysconfig]# date
Mon Apr 21 18:00:46 EDT 2003
This appears to be controlled by
/etc/sysconfig/clock :
[root@bd sysconfig]# cat clock
ZONE="America/New_York"
UTC=false
ARC=false
You could probably get away with simply editing this file (as root of
course). Make a copy of the original just in case (who knows, but always
a good policy).
The configuration files in /etc/sysconfig are normally read during
startup, so you'll probably need to cycle your computer for the
changes to be picked up, unless you can find a script or command that
will dynamcially read this file.
I got this problem solved by testing different approaches. What I did
was edit /etc/bashrc and add "TZ=America/New_York export TZ". This is
similar to Jilian's second suggestion. I also tried Julian's first
suggestion, it also worked.
Before posting for help, I'd played with /etc/sysconfig/clock, but it
didn't work for me.
Anyway, thank you guys for help.