From 015afdf36982fcecd79eb5c12d0375e82df76874 Mon Sep 17 00:00:00 2001 From: Kurt Date: Fri, 1 Oct 2021 08:35:11 -0700 Subject: [PATCH] Hardcode kiribati date shift offset Should have been "UTC+12" We can just inline the shifting since it'll always add 12 hours to the current UTC time, thus that's the maximum date value possible --- .../Legality/Encounters/EncounterSlot/GO/EncounterSlotGO.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PKHeX.Core/Legality/Encounters/EncounterSlot/GO/EncounterSlotGO.cs b/PKHeX.Core/Legality/Encounters/EncounterSlot/GO/EncounterSlotGO.cs index 0cff4b9aa..95c173586 100644 --- a/PKHeX.Core/Legality/Encounters/EncounterSlot/GO/EncounterSlotGO.cs +++ b/PKHeX.Core/Legality/Encounters/EncounterSlot/GO/EncounterSlotGO.cs @@ -71,8 +71,7 @@ public bool IsWithinStartEnd(int stamp) /// public static int GetTimeStamp(int year, int month, int day) => (year << 16) | (month << 8) | day; - private static readonly TimeZoneInfo Kiribati = TimeZoneInfo.FindSystemTimeZoneById("KI"); - private static DateTime GetMaxDateTime() => TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, Kiribati); + private static DateTime GetMaxDateTime() => DateTime.UtcNow.AddHours(12); // UTC+12 for Kiribati, no daylight savings /// /// Gets a random date within the availability range.