forked from ddrilling/AsbCloudServer
WellboreService.GetWellboresAsync(..) fix timezones
This commit is contained in:
parent
c0db1a02d3
commit
adeaab52c4
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@ -58,8 +59,8 @@ public class WellboreService : IWellboreService
|
|||||||
Id = group.Key,
|
Id = group.Key,
|
||||||
Name = sections[group.Key].Caption,
|
Name = sections[group.Key].Caption,
|
||||||
Well = well.Adapt<WellWithTimezoneDto>(),
|
Well = well.Adapt<WellWithTimezoneDto>(),
|
||||||
DateStart = group.Min(operation => operation.DateStart),
|
DateStart = group.Min(operation => operation.DateStart).ToUtcDateTimeOffset(well.Timezone.Hours).ToOffset(TimeSpan.FromHours(well.Timezone.Hours)),
|
||||||
DateEnd = group.Max(operation => operation.DateStart.AddHours(operation.DurationHours)),
|
DateEnd = group.Max(operation => operation.DateStart.AddHours(operation.DurationHours)).ToUtcDateTimeOffset(well.Timezone.Hours).ToOffset(TimeSpan.FromHours(well.Timezone.Hours)),
|
||||||
DepthStart = group.Min(operation => operation.DepthStart),
|
DepthStart = group.Min(operation => operation.DepthStart),
|
||||||
DepthEnd = group.Max(operation => operation.DepthEnd),
|
DepthEnd = group.Max(operation => operation.DepthEnd),
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user