diff --git a/util.cs b/util.cs index ce036eb..b5050e0 100644 --- a/util.cs +++ b/util.cs @@ -15,7 +15,10 @@ namespace raven_integration // public static string API_BASE_URL = "https://test.helloayanova.com/api/v8.0/"; public static string TEST_DATA_FOLDER = @"..\..\..\testdata\"; - // public const decimal TIME_ZONE_ADJUSTMENT = -8; + //Date filtering tests MUST use a relative time zone adjusted to users's forced user options time zone + //or the tests that cross dst / pst boundaries will fail + //See servers spec doc core-locale-currency-numbers-time-and-dates.txt for details + public const decimal TIME_ZONE_ADJUSTMENT = -8; //####################################################################################################### @@ -43,17 +46,17 @@ namespace raven_integration //DateTime stuff - // public static DateTime RelativeToday() - // { - // Double TimeZoneAdjustment = ((double)TIME_ZONE_ADJUSTMENT) * -1; - // return DateTime.Today.AddHours(TimeZoneAdjustment); - // } + public static DateTime RelativeToday() + { + Double TimeZoneAdjustment = ((double)TIME_ZONE_ADJUSTMENT) * -1; + return DateTime.Today.AddHours(TimeZoneAdjustment); + } - // public static DateTime RelativeNow() - // { - // Double TimeZoneAdjustment = ((double)TIME_ZONE_ADJUSTMENT) * -1; - // return DateTime.Now.AddHours(TimeZoneAdjustment); - // } + public static DateTime RelativeNow() + { + Double TimeZoneAdjustment = ((double)TIME_ZONE_ADJUSTMENT) * -1; + return DateTime.Now.AddHours(TimeZoneAdjustment); + } public static string Uniquify(string s) {