tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
428 stars 41 forks source link

Use the new Java Date/Time API #421

Closed tonihele closed 1 year ago

tonihele commented 1 year ago

Use the new Java Date/Time API... from Java 8. Sorry for being such a late bloomer :)

Tasks now use Instant rather than Date. This is actually a kinda bug fix even. The tasks could even go broke when automatically changing DST. Or in the future loading a saved game on another timezone, or just changing your timezone... Well, you get the drift, using date here is just stupid, always was.

What comes to KWD timestamps... This has been broken all along.

tonihele commented 1 year ago

DeepSource is right... It complains about the exceptions (using just the RuntimeException everywhere). We don't really have any of our own. Which... yes, we should have.