From 9e67911affa04fa7cc9252e6a10671ac1711f6b3 Mon Sep 17 00:00:00 2001 From: Yourdax Date: Sat, 27 Apr 2024 23:27:52 +0400 Subject: [PATCH] done --- .../CarpentryWorkshopContracts/ViewModels/OrderViewModel.cs | 3 ++- .../CarpentryWorkshopDatabaseImplement/Models/Order.cs | 2 +- .../CarpentryWorkshopListImplement/Models/Order.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CarpentryWorkshop/CarpentryWorkshopContracts/ViewModels/OrderViewModel.cs b/CarpentryWorkshop/CarpentryWorkshopContracts/ViewModels/OrderViewModel.cs index 11f6d68..4b19e26 100644 --- a/CarpentryWorkshop/CarpentryWorkshopContracts/ViewModels/OrderViewModel.cs +++ b/CarpentryWorkshop/CarpentryWorkshopContracts/ViewModels/OrderViewModel.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -31,7 +32,7 @@ namespace CarpentryWorkshopContracts.ViewModels [DisplayName("Статус")] public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; [DisplayName("Дата создания")] - public DateTime DateCreate { get; set; } = DateTime.Now; + public DateTime DateCreate { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); [DisplayName("Дата выполнения")] public DateTime? DateImplement { get; set; } } diff --git a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs index 1e01930..4344258 100644 --- a/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs +++ b/CarpentryWorkshop/CarpentryWorkshopDatabaseImplement/Models/Order.cs @@ -30,7 +30,7 @@ namespace CarpentryWorkshopDatabaseImplement.Models public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; [Required] - public DateTime DateCreate { get; private set; } = DateTime.Now; + public DateTime DateCreate { get; private set; } public DateTime? DateImplement { get; private set; } diff --git a/CarpentryWorkshop/CarpentryWorkshopListImplement/Models/Order.cs b/CarpentryWorkshop/CarpentryWorkshopListImplement/Models/Order.cs index 7502dd0..ebb01b8 100644 --- a/CarpentryWorkshop/CarpentryWorkshopListImplement/Models/Order.cs +++ b/CarpentryWorkshop/CarpentryWorkshopListImplement/Models/Order.cs @@ -24,7 +24,7 @@ namespace CarpentryWorkshopListImplement.Models public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; - public DateTime DateCreate { get; private set; } = DateTime.Now; + public DateTime DateCreate { get; private set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); public DateTime? DateImplement { get; private set; }