Sunday, January 13, 2013

Linux Timezone


1 .[root@li420-243 ~]# tzselect


The following information has been given:

        Taiwan

Therefore TZ='Asia/Taipei' will be used.
Local time is now:      Mon Jan 14 08:13:48 CST 2013.
Universal Time is now:  Mon Jan 14 00:13:48 UTC 2013.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
        TZ='Asia/Taipei'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Taipei

1. [root@li420-243 ~]# vim /etc/sysconfig/clock

ZONE="Asia/Taipei"
#ZONE="Etc/UTC"


3. [root@li420-243 ~]# tzdata-update
[root@li420-243 ~]# date
Mon Jan 14 08:16:27 CST 2013


No comments:

Post a Comment