From 33de4bfa1ad3d090cea576dab58a103ce4b2f7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=94?= =?UTF-8?q?=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Fri, 16 Aug 2024 09:40:26 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20=D1=80=D0=B0=D1=81=D1=88=D0=B8=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=B2=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8=20=D0=B8?= =?UTF-8?q?=D0=B7=20Utc=20=D0=B2=20=D0=BC=D0=B5=D1=81=D1=82=D0=BD=D0=BE?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudInfrastructure/DateTimeExtensions.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AsbCloudInfrastructure/DateTimeExtensions.cs b/AsbCloudInfrastructure/DateTimeExtensions.cs index 38c24f52..61b1c72c 100644 --- a/AsbCloudInfrastructure/DateTimeExtensions.cs +++ b/AsbCloudInfrastructure/DateTimeExtensions.cs @@ -36,8 +36,11 @@ namespace AsbCloudInfrastructure { if (date == default) return new DateTime(0, DateTimeKind.Unspecified); - var dateTz = date.ToOffset(TimeSpan.FromHours(remoteTimezoneOffsetHours)); - return dateTz.DateTime; + + var dateTz = date.ToOffset(TimeSpan.FromHours(remoteTimezoneOffsetHours)); + + var result = DateTime.SpecifyKind(dateTz.DateTime, DateTimeKind.Unspecified); + return result; } ///