示例#1
0
 /// <summary>
 /// Handles edge conditions when getting the Daily data when the current time is 12:00 AM. A day is subracted to handle that scenario
 /// </summary>
 private void ApplyDayOffset()
 {
     if (ReportedEndTime >= DateTime.UtcNow.AddHours(-HoursOffset))
     {
         ReportedEndTime = ReportedEndTime.AddDays(-1);
     }
 }
示例#2
0
        public void PrepareReportedTimeFortheLastNoOfDays(int lastNoOfDays = 30)
        {
            ReportedEndTime   = GetCurrentDateWithMidnightTime();
            ReportedStartTime = ReportedEndTime.AddDays(-lastNoOfDays);

            ApplyDayOffset();
        }