open_agb_firm icon indicating copy to clipboard operation
open_agb_firm copied to clipboard

Save files incorrect time and date

Open Adnan12349 opened this issue 1 year ago • 8 comments

When creating a game save, it saves it with an incorrect time and date. For example, I saved at 5/17/2024 21:00, but it shows as 5/22/2022 00:00 instead, which is totally random and wrong. It should have adapted to the console's clock time and date.

Adnan12349 avatar May 17 '24 20:05 Adnan12349

Your consoles RTC is not set correctly. The OS running on 3DS normally uses an offset from the time and date set in the RTC but it's way too much effort to get this offset from the system just for time and date.

You can open Rosalina while in HOME menu and use the options to set the time/date offset to 0 and then use the NTP feature to correct the time and date.

profi200 avatar May 18 '24 09:05 profi200

This did not solve the issue. I set the RTC on my console correctly and set the time/date offset to 0, then used the NTP feature to correct the time and date on the Rosalina menu. However, when creating a save, it still shows as 5/22/2022 00:00. I tried changing my console time to a random date, but it is stuck at 5/22/2022 00:00. Is it saving the time correctly for you?

Adnan12349 avatar May 19 '24 11:05 Adnan12349

This did not solve the issue. I set the RTC on my console correctly and set the time/date offset to 0, then used the NTP feature to correct the time and date on the Rosalina menu. However, when creating a save, it still shows as 5/22/2022 00:00. I tried changing my console time to a random date, but it is stuck at 5/22/2022 00:00. Is it saving the time correctly for you?

What game are you trying to run that doesn't work?

Dartz150 avatar May 19 '24 17:05 Dartz150

I tried Pokémon Emerald and Sonic Advance 3. When creating or editing a save file, it always saves as 5/22/2022 00:00.

Adnan12349 avatar May 19 '24 18:05 Adnan12349

Ah, are we talking about the in game clock or file creation dates? I don't have correct file creation dates implemented right now so it uses whatever i hardcode (usually the last time i updated the FatFs driver).

profi200 avatar May 19 '24 19:05 profi200

Got it, thanks for the clarification. I was actually referring to the file creation dates rather than the in-game clock. I usually keep my save files in sync, so it's important for them to have the correct time and date.

Adnan12349 avatar May 19 '24 23:05 Adnan12349

I may add this later but first i need to come up with a way to provide the time and date to the FatFs driver on ARM9 because reading the time and date from the MCU is only possible on ARM11 the way my library works. But anyway, we will see.

profi200 avatar May 20 '24 01:05 profi200

Well, i got it partially working. I had the idea to use the same RTC that GBA games use and forgot that some games reset the time and date. The access time seems to be a FatFs bug. It should at least set the access time to the creation time.

In order creation time, modified time and access time. "Heute" means today. oaf_partial_time_date

profi200 avatar May 20 '24 14:05 profi200