From: Helmut K. <hel...@is...> - 2017-11-11 09:21:23
|
Am 10.11.2017, 03:58 Uhr, schrieb Thorsten Otto: >> Shall the file-time be stored in utc or local time on disk? > > Since it is a plain tos/msdos filesystem (no vfat), it can only be > stored in > local time. So if you send the image to someone in China he will see your local times, but for a TOS-FS there might be no other way. > > I think the only possible solution is to add some flag to Dopendir, to > tell > Dxreaddir that it should return the timestamps as UTC so the application > can > do the calculation. Of course, that would also require changes to the > applications using it directly (like teradesk), and mintlib for all > others. > For other cases, like stat() and Fdatime(), there are already > alternatives > that should work, like Fstat64() and fcntl(FUTIME_UTC). Yes, store the times in UTC. Maybe mintlib can set a flag to tell the kernel about it's preference, and old apps would still work as before. As far as I see, tools like ls expect utc and call localtime to get the tm-content in local-time representation. So it should be like this: TOS-FS: file-times are local-time Others: file-times are utc. I see on getstat64,xfs_xdd.c: /* no native UTC extension * -> convert to unix UTC */ stat->atime.high_time = 0; stat->atime.time = unixtime (xattr.atime, xattr.adate) + timezone; stat->atime.nanoseconds = 0; That would mean that MiNT always tries to returns local time? And timezone is a constant not taking account of the time-offset of the actual time? |