From: Jan Kara <jack@suse.cz>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Jan Kara <jack@suse.cz>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fat: Provide option for setting timezone offset
Date: Mon, 12 Nov 2012 23:26:50 +0100 [thread overview]
Message-ID: <20121112222650.GB2575@quack.suse.cz> (raw)
In-Reply-To: <87bof269zr.fsf@devron.myhome.or.jp>
On Tue 13-11-12 01:50:48, OGAWA Hirofumi wrote:
> Jan Kara <jack@suse.cz> writes:
>
> > On Mon 12-11-12 01:06:41, OGAWA Hirofumi wrote:
> >> Jan Kara <jack@suse.cz> writes:
> >>
> >> > So far FAT either offsets time stamps by sys_tz.minuteswest or leaves them
> >> > as they are (when tz=UTC mount option is used). However in some cases it
> >> > is useful if one can specify time stamp offset on his own (e.g. when time
> >> > zone of the camera connected is different from time zone of the computer,
> >> > or when HW clock is in UTC and thus sys_tz.minuteswest == 0).
> >> >
> >> > So provide a mount option tz= which allows user to specify offset in minutes
> >> > that should be applied to time stamps on the filesystem.
> >>
> >> What is in some cases? tz_minuteswest style timezone is known as it
> >> doesn't work. E.g. summer time.
> > Yes, DST is one problem. Another problem (which is more annoying to the
> > user reporting this) is that he has HW clock set to UTC but system time is
> > in CET. Somewhat surprisingly (at least to me before I read the code) this
> > means sys_tz.minuteswest == 0. So when he connects say his camera, which
> > has time in CET, to the computer he sees timestamps off by one hour. With
> > tz= mount option he could mount the filesystem with tz=60 and be mostly
> > happy (modulo DST).
> >
> >> And tz= is reserved for true solution. E.g. load timezone database to
> >> kernel and use it for time conversion. So, if we really want this hack,
> >> it should be different option name.
> > Yes, knowing about time zones in kernel is the only way to properly
> > handle fat timestamps in the presence of DST. But time zones are such a
> > mess (DST being determined by a law separately each year) I don't see this
> > happening - the annoyance by bad timestamps simply isn't big enough.
> >
> > If you feel strongly about reserving 'tz' mount option, I can rename the
> > mount option to something else... Would 'time_offset' be OK with you?
>
> OK. It should be exclusive with "tz", and the option should be
> documented to
>
> Documentation/filesystems/vfat.txt
>
> as it doesn't work sometimes.
That's a good idea. Thanks for reminding me. I'll send you an updated
patch in a moment.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2012-11-12 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 21:57 [PATCH] fat: Provide option for setting timezone offset Jan Kara
2012-11-11 16:06 ` OGAWA Hirofumi
2012-11-12 11:05 ` Jan Kara
2012-11-12 16:50 ` OGAWA Hirofumi
2012-11-12 22:26 ` Jan Kara [this message]
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=20121112222650.GB2575@quack.suse.cz \
--to=jack@suse.cz \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).