From 3ddeee1d0f1aee2cf7ce846b2fd0118e6aede2f1 Mon Sep 17 00:00:00 2001 From: uye <2396806385@qq.com> Date: Mon, 6 Feb 2023 15:03:51 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=87=8D=E5=91=BD=E5=90=8D=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E7=AB=AF=E5=AF=B9=E5=BA=94=E6=97=B6=E9=97=B4=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Helper/Utils.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();