fix times locale
This commit is contained in:
@@ -270,3 +270,4 @@ public class VoiceCallTestController : ControllerBase
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public sealed class TelemetryService : ITelemetryService
|
|||||||
// ذخیره زمان سرور در لحظه ثبت
|
// ذخیره زمان سرور در لحظه ثبت
|
||||||
entity.ServerTimestampUtc = DateTime.Now;
|
entity.ServerTimestampUtc = DateTime.Now;
|
||||||
|
|
||||||
var dt = dto.TimestampUtc;
|
var dt = dto.TimestampUtc.ToLocalTime();
|
||||||
var py = PersianCalendar.GetYear(dt);
|
var py = PersianCalendar.GetYear(dt);
|
||||||
var pm = PersianCalendar.GetMonth(dt);
|
var pm = PersianCalendar.GetMonth(dt);
|
||||||
var pd = PersianCalendar.GetDayOfMonth(dt);
|
var pd = PersianCalendar.GetDayOfMonth(dt);
|
||||||
@@ -65,12 +65,13 @@ public sealed class TelemetryService : ITelemetryService
|
|||||||
if (filter.StartDateUtc.HasValue)
|
if (filter.StartDateUtc.HasValue)
|
||||||
{
|
{
|
||||||
//var start = filter.StartDateUtc.Value.Date.AddDays(1);
|
//var start = filter.StartDateUtc.Value.Date.AddDays(1);
|
||||||
query = query.Where(x => x.ServerTimestampUtc >= filter.StartDateUtc.Value);
|
|
||||||
|
query = query.Where(x => x.ServerTimestampUtc >= filter.StartDateUtc.Value.ToLocalTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filter.EndDateUtc.HasValue)
|
if (filter.EndDateUtc.HasValue)
|
||||||
{
|
{
|
||||||
query = query.Where(x => x.ServerTimestampUtc < filter.EndDateUtc.Value);
|
query = query.Where(x => x.ServerTimestampUtc < filter.EndDateUtc.Value.ToLocalTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(filter.Page <= 0) filter.Page = 1;
|
if(filter.Page <= 0) filter.Page = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user