#9524: [iso9660 fs add-on] time convertion mistake -------------------------------------+---------------------------- Reporter: beos_zealot | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: Unscheduled Component: File Systems/ISO 9660 | Version: R1/Development Resolution: | Keywords: timezone gmt Blocked By: | Blocking: Has a Patch: 1 | Platform: All -------------------------------------+---------------------------- Comment (by beos_zealot): It appears that FAT and also EXFAT fs add-on have the same problem. [FAT fs] The time of files/dirs is stored in FAT fs as localtime (*1), so: 1) when we read timpestamps from FAT fs we have to subtract timezone offset ("tzoffset" value) in "dos2time_t" function to get rawtime (it will be used internally as intermediate data). 2) when we write timestamps to FAT fs we have to add timezone offset ("tzoffset" value) in "time_t2dos" function to the rawtime to make it localtime (it will be directly written to fs). [EXFAT fs] The time of files/dirs is stored in EXFAT fs as localtime (*2), so when we read timpestamps from EXFAT fs we have to subtract timezone offset ("tzoffset" value) in "_GetTimespec" function to get rawtime (it will be used internally as intermediate data). *1)http://msdn.microsoft.com/en-us/library/ms724290.aspx (second paragraph) *2)http://www.sans.org/reading_room/whitepapers/forensics/rss/reverse_engineering_the_microsoft_exfat_file_system_33274 (page 39). Actually EXFAT also has optional UTC timestamp support, but it's not implemented in our fs add-on Attached new common patch for all three fs add-ons, because patch is small and it fixes the same problem, so i think it's not necessary to make separate tickets+patches for each fs add-on. P.S. Could anybody (with admin rights) edit ticket - add appropriate additional components and change name to: [iso9660 fs add-on] time convertion mistake -> [iso9660, fat and exfat fs add-ons] time convertion mistakes Thanks in advance :) -- Ticket URL: <http://dev.haiku-os.org/ticket/9524#comment:5> Haiku <http://dev.haiku-os.org> Haiku - the operating system.