This commit is contained in:
2018-12-10 19:26:21 +00:00
parent 5e5aff2a71
commit 0bbf3c68f6
3 changed files with 34 additions and 3 deletions

View File

@@ -187,6 +187,37 @@ SERVER DEVOPS VERSION:
2018-12-10 16:46:25.5657|INFO|WidgetBiz::GetManyAsync|SELECT *, xmin FROM AWIDGET where name Like 'DateTokenNextMonthFilterWorks%' AND startdate >'2018-12-31T23:59:59.0000000Z' AND startdate <'2019-02-01T00:00:00.0000000Z'
2018-12-10 16:46:25.5733|WARN|Microsoft.EntityFrameworkCore.Query|Query: '(from Widget <generated>_4 in DbSet<Widget> select [<generated>_4]).Skip(__p_1).Take(__p_2)' uses a row limiting operation (Skip/Take) without OrderBy which may lead to unpredictable results.
//AFTER UPDATE
2018-12-10 19:17:47.3300|INFO|WidgetBiz::GetManyAsync|Filter criteria:
2018-12-10 19:17:47.3300|INFO|WidgetBiz::GetManyAsync|[
{
"fld": "name",
"op": "%-",
"value": "DateTokenNextMonthFilterWorks"
},
{
"fld": "startdate",
"op": "=",
"value": "{[nextmonth]}"
}
]
2018-12-10 19:17:47.3300|INFO|WidgetBiz::GetManyAsync|Generated SQL:
2018-12-10 19:17:47.3300|INFO|WidgetBiz::GetManyAsync|SELECT *, xmin FROM AWIDGET where name Like 'DateTokenNextMonthFilterWorks%' AND startdate >'2018-12-31T23:59:59.0000000Z' AND startdate <'2019-02-01T00:00:00.0000000Z'
WHAT IS HAPPENING
what is happening is that the data is converted to UTC before sending to the server, the server is supposed to be a dumb date unaware repository
However if I want "next month" then that's relative to my personal location, I can't go by the server's next month because that is in UTC and I'm not.

View File

@@ -288,7 +288,7 @@ namespace AyaNova.Biz
//Fetch useroptions object and relative time offset
AyaNova.Models.AyContext ct = AyaNova.Util.ServiceProviderProvider.DBContext;
var u = ct.User.AsNoTracking().Where(a => a.Id == userId).Select(m => new { tz = m.UserOptions.TimeZoneOffset }).First();
RelativeToday.AddHours((double)u.tz);
RelativeToday=RelativeToday.AddHours((double)u.tz);
#region Build criteria for date RANGE TOKEN specified
//Used as the basis point

View File

@@ -12,8 +12,8 @@ namespace raven_integration
{
private static HttpClient client { get; } = new HttpClient();
// private static string API_BASE_URL = "http://localhost:7575/api/v8.0/";
private static string API_BASE_URL = "https://test.helloayanova.com/api/v8.0/";
private static string API_BASE_URL = "http://localhost:7575/api/v8.0/";
// private static string API_BASE_URL = "https://test.helloayanova.com/api/v8.0/";
public static string TEST_DATA_FOLDER = @"..\..\..\testdata\";