<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Allow to disable setting the kernel time zone"
href="https://bugs.freedesktop.org/show_bug.cgi?id=81538#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Allow to disable setting the kernel time zone"
href="https://bugs.freedesktop.org/show_bug.cgi?id=81538">bug 81538</a>
from <span class="vcard"><a class="email" href="mailto:george@nsup.org" title="Nicolas George <george@nsup.org>"> <span class="fn">Nicolas George</span></a>
</span></b>
<pre>I believe you are mistaken on how the kernel timezone works.
The kernel does not have a zoneinfo database. Therefore, it can not take
daylight saving time (DST) into account.
The offset the kernel applies to timestamps on legacy filesystems is constant,
it is the offset corresponding to the instant the kernel timezone was set. As a
consequence, the timestamps of the files created near that time are valid, but
the timestamps of the files modified on the other side of the DST will be off
by one hour.
For example, I am currently in CEST and my kernel booted this morning, that
makes it at +0200. Files modified sometime between November and March would be
in CET, not CEST, at +0100, but the kernel does not know that: therefore, their
timestamps will appear off by one hour. Conversely, files that I modify today
will appear off by one hour in the other direction if I mount them in six
months.
The short of it is that it is NOT POSSIBLE to store timestamps in local time if
there is no timezone indication (if only because the local time - UTC
conversion is not a bijection), and it is EVEN LESS POSSIBLE without a zoneinfo
database. Nobody serious would want a zoneinfo database in the kernel.
The current system produces usually correct timestamps for files created
recently, and older files arguably do not need so much accuracy. This is
probably good enough for most people, but not for people who actually use the
timestamps, and not for me.
When living in a place with DST, the only reasonable thing to do is to store
the timestamps in UTC. The conversion will happen in userspace, exactly as it
happens for ext4 for example. That works perfectly (as long as the files are
not modified on another OS; the Linux community can do nothing about that).
Selecting that option at each mount is error prone and not convenient, better
to do it globally.
(For reference, I use the timestamps to synchronize a collection of files on an
Android phone; due to Android, I can not use a better filesystem, but the
timestamps are only used on systems that consider them UTC.)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>