Monday, December 27, 2010

Change Time Zone in Linux

Check the /usr/share/zoneinfo directory. Hopefully, it will contain a UTC or


GMT file timezone file. You can then simply link that file to /etc/localtime:



# cp /etc/localtime /etc/localtime.backup ;ln -s /etc/localtime /usr/share/zoneinfo/UTC /etc/localtime



Are you sure you don't have a TZ variable set in your user ENV? Regardless of

system time zone, the TZ variable will over-ride that on a per user basis.



# date

Mon Apr 19 19:39:04 CEST 2004

# mv /etc/localtime /etc/localtime.save

# date

Mon Apr 19 17:39:11 UTC 2004

No comments:

Post a Comment