From: OGAWA Hirofumi Subject: Re: [PATCH] fat: Provide option for setting timezone offset Date: Tue, 13 Nov 2012 01:50:48 +0900 Message-ID: <87bof269zr.fsf@devron.myhome.or.jp> References: <1352411879-5362-1-git-send-email-jack@suse.cz> <878va886pa.fsf@devron.myhome.or.jp> <20121112110553.GB23297@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from mail.parknet.co.jp ([210.171.160.6]:59615 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753805Ab2KLQu7 (ORCPT ); Mon, 12 Nov 2012 11:50:59 -0500 In-Reply-To: <20121112110553.GB23297@quack.suse.cz> (Jan Kara's message of "Mon, 12 Nov 2012 12:05:53 +0100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. -- OGAWA Hirofumi