Skip to content

Commit 8eda9c1

Browse files
authored
find Korea timezone on Linux (#732)
1 parent 786de5e commit 8eda9c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ExchangeSharp/Utility/CryptoUtility.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public static class CryptoUtility
3737
internal static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
3838
internal static readonly DateTime UnixEpochLocal = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
3939
internal static readonly Encoding Utf8EncodingNoPrefix = new UTF8Encoding(false, true);
40-
static string koreanZoneId = "Korea Standard Time";
40+
static bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
41+
static string koreanZoneId = isWindows ? "Korea Standard Time" : "Asia/Seoul";
4142
static TimeZoneInfo koreaZone = TimeZoneInfo.FindSystemTimeZoneById(koreanZoneId);
4243

4344
private static Func<DateTime> utcNowFunc = UtcNowFuncImpl;

0 commit comments

Comments
 (0)