From 22785f46ea4717567adf23bb03e650afc8945c31 Mon Sep 17 00:00:00 2001 From: Sunghwan Bang Date: Fri, 20 Sep 2024 08:17:29 +0900 Subject: [PATCH] edits --- .../src/Core/Serialization/DateTimeSerializer.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/StrawberryShake/Client/src/Core/Serialization/DateTimeSerializer.cs b/src/StrawberryShake/Client/src/Core/Serialization/DateTimeSerializer.cs index 883deb63551..05f42dbdfcc 100644 --- a/src/StrawberryShake/Client/src/Core/Serialization/DateTimeSerializer.cs +++ b/src/StrawberryShake/Client/src/Core/Serialization/DateTimeSerializer.cs @@ -44,23 +44,11 @@ private static bool TryDeserializeFromString( string? serialized, [NotNullWhen(true)] out DateTimeOffset? value) { - if (serialized is not null - && serialized.EndsWith("Z") - && DateTime.TryParse( - serialized, - CultureInfo.InvariantCulture, - DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, - out var zuluTime)) - { - value = new DateTimeOffset( - zuluTime.ToUniversalTime(), - TimeSpan.Zero); - return true; - } - if (serialized is not null && DateTimeOffset.TryParse( serialized, + CultureInfo.InvariantCulture, + DateTimeStyles.None, out var dt)) { value = dt;