Merge pull request 'Фикс метода расширения перевода времени из Utc в местное' (#310) from fix/operation_detection into dev

Reviewed-on: https://test.digitaldrilling.ru:8443/DDrilling/AsbCloudServer/pulls/310
This commit is contained in:
Никита Фролов 2024-08-16 13:24:23 +05:00
commit f4f968d9e6

View File

@ -36,8 +36,11 @@ namespace AsbCloudInfrastructure
{ {
if (date == default) if (date == default)
return new DateTime(0, DateTimeKind.Unspecified); 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;
} }
/// <summary> /// <summary>