DS-Homebrew / TWiLightMenu

DSi Menu replacement for DS/DSi/3DS/2DS
https://wiki.ds-homebrew.com/twilightmenu/
GNU General Public License v3.0
3.25k stars 204 forks source link

Add TimeZone support to allow accurate filesystem timestamps. #2360

Open YourWishes opened 7 months ago

YourWishes commented 7 months ago

Is your feature request related to a problem? Please describe. FileSystem operations (mainly save files) are using the system's time and assuming the system is set to UTC.

Currently if I were in a timezone, e.g. UTC+4:00, and have my system clock set to match what I see my clock say on the wall, the save file will write the time assuming UTC+0 and thus write a timestamp that is 4 hours into the future incorrectly. If I live in UTC-6 and save at 17:00, the save file will appear to have been saved at 11AM (6 hours in the past)

Describe the solution you'd like The option to select a system timezone, along with Daylight Savings settings would allow the system to more accurately reflect the real time a savefile was saved, also provides the potential of writing the time accurately back to the DSi system to keep up with DST/TimeZone changes.

Describe alternatives you've considered Currently I set my DSi clock to the future (relative to where I live), so that it is accurately saving timestamps. This has the inverse problem of making the games themselves have the wrong time, e.g. the poketch in DPPt showing 23:00 when it is 17:00 in my local timzone.

Additional context

Masamune3210 commented 7 months ago

This might be a "Nin did it this way, so we just have to live with it" issue. I know on the 3DS, there is no functional way to handle changing such attributes iirc.

NightScript370 commented 7 months ago

Stuff on the 3DS don't apply here, since the Nintendo DS is all running baremetal code, meaning we're not bound to an "OS's file system code". With that being said, this would be better as a request for libfat, the library we use. In the long run, we'd like to switch to using BlocksDS so you could also ask there in their libnds repo.

YourWishes commented 7 months ago

I've opened and started a convo on libnds' side. Would love to get some more info on how the save operations from official nds bins are being diverted to the SD card at the moment?