cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

os:linux:international:timezone.html



Linux

TimeZone - How to Configure TimeZone in Linux

Basic


TimeZone

Configuration

GMT

#rm /etc/localtime
#ln -sf /usr/share/zoneinfo/GMT /etc/localtime

#date

#/etc/init.d/syslog restart
#/etc/init.d/crond restart

JP

#rm /etc/localtime
#ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

# LANG=C
# date
Tue Mar 10 11:09:43 JST 2015

#/etc/init.d/syslog restart
#/etc/init.d/crond restart

HK

#rm /etc/localtime
#ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime

# date
Tue Mar 10 10:08:54 HKT 2015

#/etc/init.d/syslog restart
#/etc/init.d/crond restart


System Hardware Clock

Image

Hardware             Linux Kernel
  [Interval Timer]----> [System Clock]
                          |    date, ntpdate, ntpd
  [hardware Clock]--------+
      hwclock

Configuration

localtime

#vi /etc/sysconfig/clock

ZONE="Asia/Tokyo"
UTC=false

# source /etc/sysconfig/clock

# cat /etc/adjtime

UTC

# cat /etc/sysconfig/clock

#ZONE=""
UTC=true

# source /etc/sysconfig/clock

# cat /etc/adjtime
-0.068450 1422083052 0.000000
1422083052
UTC


Refalence




os/linux/international/timezone.html.txt ยท Last modified: 2017/05/14 by admin

Page Tools