From 06fc056828ae1d7f285addb82aad686a9d54cdb4 Mon Sep 17 00:00:00 2001 From: Victor Lee Date: Mon, 7 Feb 2022 21:00:01 -0800 Subject: [PATCH] find Korea timezone on Linux --- src/ExchangeSharp/Utility/CryptoUtility.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ExchangeSharp/Utility/CryptoUtility.cs b/src/ExchangeSharp/Utility/CryptoUtility.cs index ed55b0a5..6c5e45f4 100644 --- a/src/ExchangeSharp/Utility/CryptoUtility.cs +++ b/src/ExchangeSharp/Utility/CryptoUtility.cs @@ -37,7 +37,8 @@ public static class CryptoUtility internal static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); internal static readonly DateTime UnixEpochLocal = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local); internal static readonly Encoding Utf8EncodingNoPrefix = new UTF8Encoding(false, true); - static string koreanZoneId = "Korea Standard Time"; + static bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + static string koreanZoneId = isWindows ? "Korea Standard Time" : "Asia/Seoul"; static TimeZoneInfo koreaZone = TimeZoneInfo.FindSystemTimeZoneById(koreanZoneId); private static Func utcNowFunc = UtcNowFuncImpl;