public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Peterson <joe@skyrush.com>
To: James Cloos <cloos@jhcloos.com>
Cc: linux-kernel@vger.kernel.org,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH] UTC timestamp option for FAT filesystems
Date: Sat, 28 Jun 2008 23:03:09 -0600	[thread overview]
Message-ID: <4867178D.50106@skyrush.com> (raw)
In-Reply-To: <m31w2h6vup.fsf@lugabout.jhcloos.org>

James Cloos wrote:
> Joe> For a camera, since DST is not taken into account.  If you really
> Joe> want to set your camera to local time and are willing to accept the
> Joe> inherent issues, why not just use local time FAT behavior as it is
> Joe> now in Linux.
> 
> Taking the rôle of Devil’s Advocate, why presume that the camera and the
> box will have the same idea of local time?  One might set the camera to
> local time on a vacation, take some pics, return home and only them mount
> the card on one's box.

Hi James, I think you have hit squarely on the issue.  One could do
this, and the result would be potentially confusing and incorrect.

Say someone lives in Denver, and it is summer.  The UTC offset here is
-6 hours.  That person travels to the east coast, sets his camera to
local time there (UTC - 4), and takes a picture at 9:00am.  He then
returns to Denver and transfers the pic to his PC.  Using the current
Linux FAT mount behavior, the picture would be given a timestamp in
Linux of 15:00 UTC (9:00am local time in Denver, since the code
preserves the local time stamp, which is 9:00).  Now, the picture was
actually taken at 13:00 UTC (7:00am local time in Denver), and since UTC
is what matters in Linux, the actual time is two hours off.

In order to make sense of the timestamp on the picture, he would have to
remember where the picture was taken and do a time zone correction,
remembering that the picture was downloaded in Denver preserving local
time.  It's starting to get a bit mind-bending already, but see the
example of moving to England below for how it can get worse.

> It does seem likely that anyone who sets the camera's time at all will
> probably prefer localtime.  And if they know that one card has photos
> taken during a winter visit to Orlando, and another from a summer trip
> to Alaska, they may want to copy over accurate timestamps.

Some people will perfer the timestamps be in localtime, but this is
really problematic, since times in Linux's filesystems (ext3, etc.), and
even Windows' NTFS, are stored in UTC internally (which is a good thing).

Now things potentially get interesting...

Say that same person who took the picture on the east coast at 9:00am
(but timestamped 9:00am Denver time now) moves to England with his PC.
He then sets his computer's time zone to his new local time zone, and it
now says the picture was taken at 4:00pm!  He can no longer think of the
timestamp as local time, but then again it is not even correct in local
time where the picture was taken, since that would have been 11:00 east
coast time.

Now, if the guy had kept his camera on Denver time during his travels
and no DST change happened between taking the pictures and downloading
them, the correct timestamps would have been preserved (if DST status
was different, however, the timestamp would be off by one hour).  But if
one is going to pick a "universal time" that is not necessarily local
time for the camera while traveling, why not use UTC and avoid all of
the issues?

So I guess my point is that the option I propose will allow people to
set their cameras to UTC and thereby always get unambiguously correct
timestamps.  Plus there is no need to ever change the camera's clock
when traveling or when DST changes happen.  Not all people will choose
to operate this way, so it would be nice to have the choice.

						-Joe

  reply	other threads:[~2008-06-29  5:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25  5:24 [PATCH] UTC timestamp option for FAT filesystems Joe Peterson
2008-06-25 22:33 ` Andi Kleen
2008-06-25 23:56   ` Joe Peterson
2008-06-26  2:44     ` Joe Peterson
2008-06-26  7:32       ` OGAWA Hirofumi
2008-06-26 13:23         ` Joe Peterson
2008-06-26 14:37           ` OGAWA Hirofumi
2008-06-26 15:45             ` Joe Peterson
2008-06-26 16:26               ` OGAWA Hirofumi
2008-06-26 17:06                 ` Joe Peterson
2008-06-28 22:24                   ` James Cloos
2008-06-29  5:03                     ` Joe Peterson [this message]
2008-06-29  8:20                       ` Bernd Eckenfels
2008-06-26 17:21                 ` Joe Peterson
2008-06-26 18:15                   ` OGAWA Hirofumi
2008-06-27  5:12                   ` Joe Peterson
2008-07-01 23:25                     ` Andrew Morton
2008-07-02  4:43                       ` Joe Peterson
2008-07-01 23:27                     ` Andrew Morton
2008-07-02 14:47                       ` Joe Peterson
2008-06-26 16:01             ` Joe Peterson
2008-06-26 17:08               ` OGAWA Hirofumi
  -- strict thread matches above, loose matches on Subject: below --
2008-06-25 13:31 barry bouwsma
2008-06-25 14:42 ` Joe Peterson
2008-06-25 19:35   ` barry bouwsma
2008-06-26  4:24     ` Joe Peterson
2008-06-26 19:07       ` barry bouwsma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4867178D.50106@skyrush.com \
    --to=joe@skyrush.com \
    --cc=andi@firstfloor.org \
    --cc=cloos@jhcloos.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox