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 +8.25 -8.5 -9
|
||||||
/// 不传默认+8
|
/// 不传默认+8
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float? TimeZone { get; set; } = 8;
|
private float? _timeZone;
|
||||||
|
|
||||||
|
public float? TimeZone
|
||||||
|
{
|
||||||
|
get => _timeZone ?? 8;
|
||||||
|
set => _timeZone = value;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 排序方式
|
/// 排序方式
|
||||||
|
|||||||
@ -55,8 +55,8 @@ public class TrackQueryService : ApplicationService
|
|||||||
Status = x.TrackStatus,
|
Status = x.TrackStatus,
|
||||||
Content = x.TrackContent,
|
Content = x.TrackContent,
|
||||||
Location = x.TrackPlace,
|
Location = x.TrackPlace,
|
||||||
Time = x.TrackTime.AddHours(input.TimeZone!.Value - x.TrackTimeZone),
|
Time = x.TrackTime.AddHours(input.TimeZone ?? 8 - x.TrackTimeZone),
|
||||||
TimeZone = input.TimeZone!.Value
|
TimeZone = input.TimeZone ?? 8
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
res.Add(item);
|
res.Add(item);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user