This commit is contained in:
2020-02-03 23:21:21 +00:00
parent 1c950dd45a
commit 9a2ddc147f
2 changed files with 11 additions and 2 deletions

12
util.cs
View File

@@ -17,8 +17,16 @@ namespace raven_integration
//or the tests that cross dst / pst boundaries will fail
//See servers spec doc core-locale-currency-numbers-time-and-dates.txt for details
double TIME_ZONE_ADJUSTMENT = -8;// <---=== SET THIS TO SAME AS GENERATED DATA OFFSET AT SERVER
Double TimeZoneAdjustment = (TIME_ZONE_ADJUSTMENT) * -1;
return dtIn.AddHours(TimeZoneAdjustment).ToUniversalTime();
return DateTime.SpecifyKind(dtIn.AddHours(((TIME_ZONE_ADJUSTMENT) * -1)), DateTimeKind.Utc);
//above is just this but shorter:
// Double TimeZoneAdjustment = (TIME_ZONE_ADJUSTMENT) * -1;
// dtIn = dtIn.AddHours(TimeZoneAdjustment);
// DateTime other = DateTime.SpecifyKind(dtIn, DateTimeKind.Utc);
// return other;
}
}