fix times locale
This commit is contained in:
@@ -32,7 +32,7 @@ public sealed class TelemetryService : ITelemetryService
|
||||
// ذخیره زمان سرور در لحظه ثبت
|
||||
entity.ServerTimestampUtc = DateTime.Now;
|
||||
|
||||
var dt = dto.TimestampUtc;
|
||||
var dt = dto.TimestampUtc.ToLocalTime();
|
||||
var py = PersianCalendar.GetYear(dt);
|
||||
var pm = PersianCalendar.GetMonth(dt);
|
||||
var pd = PersianCalendar.GetDayOfMonth(dt);
|
||||
@@ -65,12 +65,13 @@ public sealed class TelemetryService : ITelemetryService
|
||||
if (filter.StartDateUtc.HasValue)
|
||||
{
|
||||
//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)
|
||||
{
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user