Timezone in date?

Where does Linux date command get timezone information from? I do not see the file /etc/localtime and /usr/share/zoneinfo direcory on my system. However, when I execute the date command, I get the following output

Thu Dec 9 16:28:18 UTC 2010

Tell me, where does the team get timezone information from?

Thanks LinuxPenseur

+4
source share
3 answers

From http://www.wikihow.com/Change-the-Timezone-in-Linux

On mobile phones and other small devices running Linux, the time zone is stored differently. It is written in the / etc / TZ file in the format described, for example, in [4] . Edit this file manually or use echo (e.g. echo GMT0BST> / etc / TZ to set the time zone of the United Kingdom).

From http://www.radisys.com/files/support_downloads/03245-02_MPCMM0001_MPCMM0002_CMM_Software_TPS.pdf

CMM detects the offset to the local time zone saved in the / etc / cmm / TZ file and automatically updates the time.

+2
source

Remember that UTC is how standard Unix systems store the date and time in real time. You have to jump through hoops using fun programs (see hwclock(8) manpage) if you are booting into Windows twice, which prefers local time for storing CMOS real-time clocks.

So, the date(1) program just shows you the results β€œI don’t have a configured time zone”:

 # date -u Thu Dec 9 10:40:54 UTC 2010 # TZ=UTC date Thu Dec 9 10:40:57 UTC 2010 # TZ=PST8PDT date Thu Dec 9 02:41:02 PST 2010 # 
+2
source

All Articles