From: Jan Kara Subject: Re: [PATCH] fat: Provide option for setting timezone offset Date: Mon, 12 Nov 2012 23:26:50 +0100 Message-ID: <20121112222650.GB2575@quack.suse.cz> References: <1352411879-5362-1-git-send-email-jack@suse.cz> <878va886pa.fsf@devron.myhome.or.jp> <20121112110553.GB23297@quack.suse.cz> <87bof269zr.fsf@devron.myhome.or.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , linux-fsdevel@vger.kernel.org To: OGAWA Hirofumi Return-path: Received: from cantor2.suse.de ([195.135.220.15]:56538 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157Ab2KLW0x (ORCPT ); Mon, 12 Nov 2012 17:26:53 -0500 Content-Disposition: inline In-Reply-To: <87bof269zr.fsf@devron.myhome.or.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 13-11-12 01:50:48, OGAWA Hirofumi wrote: > Jan Kara writes: > > > On Mon 12-11-12 01:06:41, OGAWA Hirofumi wrote: > >> Jan Kara 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 SUSE Labs, CR