This commit is contained in:
2020-02-03 18:50:56 +00:00
parent c18cb5736a
commit 6c36a2f470

25
util.cs
View File

@@ -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)
{