File stamps are unix time. This is the number of seconds since
midnight, January 1, 1970 (UTC) not counting leap seconds. This is
also how the Linux clock tracks time so that no calculations are
required when saving the current time as a file's time stamp. The
time displayed on your computer is simply a human-readable
interpretation of the internal clock based on your time zone
On Wednesday 28 November 2012 10:09:42 Ralf
> On Wed, 2012-11-28 at 15:55 +0530, J. B
> > Hello list,
> > My box is configured to the local
time zone from beginning, both hwclock
> > and system time. But linux always
favor hwclock to UTC. What is the
> > advantage of doing that ?
Your hwclock stays put and daylight saving
and latitude is managed by tzdata to show local time. File
time-stamps are set to local time, however.
Please correct me if I'm wrong.
The document distinguishes between a
Linux-only-system and a double-boot-system with MS Windows.
In the case of double boot you should set
hwclock to local time, as mentioned in the document, or follow
the advice by Andrei Popescu and set hwclock to UTC and let
WIndows also show UTC. That is useful for radio amateurs who log
their activity in UTC anyway.
> > If I need my hwclock to UTC then
what should be the right way to do that
> > ? I have followed "dpkg-reconfigure
tzdata" and found it has changed the
> > local time to UTC too. Confused
Well, J.B. you did something wrong then.
Please show us exactly which steps you did -
command by command. Did you set hwclock in the BIOS and then
rebooted or did you use "hwclock -u"?
Please show us:
Then we might be able to find out where the
> The Linux has to know if the hwclock
does use UTC or not and then it
> will set up the clock, when running a
Linux to the correct time for your
> timezone. IOW you only have to inform
what time hwclock does use.
> I'm living in Germany, if my hwclock
would use UTC time, then saving
> e.g. BIOS settings, would add a wrong
time to the files. So I can't see
> an advantage in using UTC. I'm using
local time for the hwclock.
Well, Ralf, that wasn't exactly the setting
of the OP or was it?
Why do you think that the file creation time
is set to UTC and not local time unless your system time is UTC
File timestamps are set according to system
time - always, or did I miss something?
hwclock --systohc --utc
username@hostname:~$ touch filetimetest
username@hostname:~$ ls -la |grep timetest
-rw-r--r-- 1 user group 0 Nov 28 11:42
username@hostname:~$ date -u
Wed Nov 28 14:43:01 UTC 2012
Wed Nov 28 11:43:03 PYST 2012