https://bugzilla.novell.com/show_bug.cgi?id=681109
https://bugzilla.novell.com/show_bug.cgi?id=681109#c16
Jan Kara changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEEDINFO
InfoProvider| |werner@suse.com
--- Comment #16 from Jan Kara 2012-08-28 22:53:27 UTC ---
Well, Standa, it seems you have found all the facts yourself so I don't have
much to add :). FAT stores modification times in local time. Kernel doesn't
know anything about time zones, you can only set sys_tz.tz_minuteswest which is
an offset of system clock from local time. Linux VFS stores time stamps in UTC
so FAT driver stores (disk_timestamp + sys_tz.tz_minuteswest) in the in-core
inode. So in your setup, if sys_tz is set correctly, you can get correct time
stamps for files written with the same DST setting (and that actually assumes
that originator time zone is the same as recipient time zone). That's about it.
If you want better results, all I can suggest is to set camera's clock to UTC
and use tz=UTC mount option when mounting the camera.
You could also argue kernel should know about time zones and DST times in
particular - that's not going to happen since that requires database of when
DST switchover happens for each country in each year (in some countries this
date is decided by a special law passed each year separately) and we don't want
to have that in kernel...
Oh, and regarding sys_tz setting which was discussed in the beginning of this
bug: settimeofday(2) use of 'tz' is subtle. The first time someone calls
settimeofday(2) with non-zero 'tz', tz.tz_minuteswest is used to warp system
clock (if tv == NULL). This is used by warpclock as Werner references in the
above comment. But after this initial warping happens, setting of sys_tz has no
effect on system clock and nothing outside kernel VFAT driver (and a few other
drivers as you say) seems to care about it's value so you are free to set it to
whatever you want.
So it seems possible to have CMOS clock in UTC and kernel sys_tz set to -120 as
you need. Werner?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.