fix 轨迹查询时区不传默认为+8
This commit is contained in:
parent
447ea8ae8f
commit
7365a23f63
@ -20,7 +20,13 @@ public class GetTrackInput
|
||||
/// 时区 +8 +8.25 -8.5 -9
|
||||
/// 不传默认+8
|
||||
/// </summary>
|
||||
public float? TimeZone { get; set; } = 8;
|
||||
private float? _timeZone;
|
||||
|
||||
public float? TimeZone
|
||||
{
|
||||
get => _timeZone ?? 8;
|
||||
set => _timeZone = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序方式
|
||||
|
||||
@ -55,8 +55,8 @@ public class TrackQueryService : ApplicationService
|
||||
Status = x.TrackStatus,
|
||||
Content = x.TrackContent,
|
||||
Location = x.TrackPlace,
|
||||
Time = x.TrackTime.AddHours(input.TimeZone!.Value - x.TrackTimeZone),
|
||||
TimeZone = input.TimeZone!.Value
|
||||
Time = x.TrackTime.AddHours(input.TimeZone ?? 8 - x.TrackTimeZone),
|
||||
TimeZone = input.TimeZone ?? 8
|
||||
}).ToList();
|
||||
|
||||
res.Add(item);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user