This commit is contained in:
2020-02-03 23:37:44 +00:00
parent 9a2ddc147f
commit 442417b1ba

16
util.cs
View File

@@ -10,23 +10,17 @@ namespace raven_integration
{
public static class TimeZoneAdjustmentExtension
{
//#######################################################################################################
public static DateTime ToOffsetAdjustedUniversalTime(this DateTime dtIn)
{
//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
//#######################################################################################################
double TIME_ZONE_ADJUSTMENT = -8;// <---=== SET THIS TO SAME AS GENERATED DATA OFFSET AT SERVER
//#######################################################################################################
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;
}
}
@@ -34,8 +28,8 @@ namespace raven_integration
public static class Util
{
//#######################################################################################################
public static string API_BASE_URL = "http://localhost:7575/api/v8/";
// public static string API_BASE_URL = "https://test.helloayanova.com/api/v8.0/";
//public static string API_BASE_URL = "http://localhost:7575/api/v8/";
public static string API_BASE_URL = "https://test.helloayanova.com/api/v8.0/";
public static string TEST_DATA_FOLDER = @"..\..\..\testdata\";
//#######################################################################################################