kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.64k stars 684 forks source link

[Bug] Converting from wc7full to wc7 does not keep proper date #1289

Closed sora10pls closed 7 years ago

sora10pls commented 7 years ago

Tested using the recent Victini Event added to the Events Gallery. To reproduce:

Load wc7full into Gen 7 Mystery Gift Editor -> Export as WC7 -> Compare dates in hex editor

Value at offset 0x254 (wc7full) => 86 9A 02 Value at offset 0x4C (wc7) => CD 9A 02

In-game, the date is displayed as 06/99/2017.

Editing offset 0x4C to have the values 86 9A 02 properly displayed the date as 06/30/2017 (the exact day this Event was released).

kwsch commented 7 years ago

Is this even a bug with PKHeX?

sora10pls commented 7 years ago

One would assume so because the date is correct with the wc7full, but only changes when I import/export it with PKHeX.

kwsch commented 7 years ago

0x029ACD = 170701, aka July 1, 2017 0x029686 = 170630, aka June 30, 2017

0x029ACB = 170699, which is -2 from the pasted value.

When PKHeX loads a wc7full, it ignores the downloaded date and applies the current day's date. The wc7 is then saved with today's date, and injecting that wc7 yields a pkm received on today's date.

Not sure if there is an issue here?

sora10pls commented 7 years ago

If dropping onto the PKM Editor, yes, it does convert it to today's date. I was referring to when I check the Wonder Card obtained date, not the Pokemon itself in my Boxes.

If I inject the Wonder Card into the Mystery Gift editor, the date is preserved as 0x029ACB as you mentioned (-2 from the pasted value), but not when converted to a PKM. The Mystery Gift editor does not change the date to today's, only the PKM editor. That's why when it's converted to a PKM, it'll show the met date as today's date, but when viewing the Wonder Card in the Mystery Gift menu in-game, it displays 06/99/2017, as opposed to today's date.

Could be that I'm just overlooking something (probably is lmao), so if there's no problem here, feel free to close :)

kwsch commented 7 years ago

I can't see where it makes it -2, every time I get 0x029ACD not 0x092ACB... aka unable to replicate

sora10pls commented 7 years ago

Okay that's extremely weird, only happened when the date was July 1st. Now that it's July 2nd (I'm on the east coast), the problem won't persist. Importing the wc7full now properly sets the date to today's date after further testing as of it being July 2nd.