diff --git a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs index 745fe39c..a503918d 100644 --- a/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs +++ b/AsbCloudInfrastructure/Services/DailyReport/DailyReportService.cs @@ -52,7 +52,7 @@ namespace AsbCloudInfrastructure.Services.DailyReport { var dailyReportDto = await GetAsync(idWell, date, token); if (dailyReportDto is null) - return await MakeDefaultDailyReportAsync(idWell, token); + return await MakeDefaultDailyReportAsync(idWell, date, token); else return dailyReportDto; } @@ -119,13 +119,13 @@ namespace AsbCloudInfrastructure.Services.DailyReport return Convert(entity, offsetHours); } - private async Task MakeDefaultDailyReportAsync(int idWell, CancellationToken token) + private async Task MakeDefaultDailyReportAsync(int idWell, DateTime date, CancellationToken token) { var well = await wellService.GetAsync(idWell, token); var offsetHours = wellService.GetTimezone(idWell).Hours; var dto = new DailyReportDto() { - ReportDate = DateTimeOffset.UtcNow.ToRemoteDateTime(offsetHours).Date, + ReportDate = date, WellName = well.Caption, ClusterName = well.Cluster, };