diff --git a/src/MaaWpfGui/Helper/Utils.cs b/src/MaaWpfGui/Helper/Utils.cs index 3c683330f7..958848be5f 100644 --- a/src/MaaWpfGui/Helper/Utils.cs +++ b/src/MaaWpfGui/Helper/Utils.cs @@ -62,7 +62,7 @@ namespace MaaWpfGui public static string ClientType { get => _clientType; set => _clientType = value; } - private static readonly Dictionary clientList = new Dictionary + private static readonly Dictionary _clientTypeTimeOffsetMap = new Dictionary { { string.Empty, 4 }, { "Official", 4 }, @@ -79,7 +79,7 @@ namespace MaaWpfGui /// yj历时间 public static DateTime GetYJTimeNow() { - return DateTime.UtcNow.AddHours(clientList[ClientType]); + return DateTime.UtcNow.AddHours(_clientTypeTimeOffsetMap[ClientType]); } /// @@ -116,7 +116,7 @@ namespace MaaWpfGui /// yj历格式的时间 public static DateTime ToYJTime(DateTime dt) { - return dt.AddHours(clientList[ClientType]); + return dt.AddHours(_clientTypeTimeOffsetMap[ClientType]); } private static readonly JObject _itemList = new JObject();