diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 19ddc13e..437ce5cf 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -193,7 +193,7 @@ However if I want "next month" then that's relative to my personal location, I c So for the server to process *my* next month it needs to know what my relative time offset is. I've decided to never trust the client for current time zone information and use an independent setting for the user account. So the relative time query builders need to use the relative offset in the production of the NOW date that everything keys off of. - +SOLUTION: provide the relative time offset to the sql criteria builder for CURRENT USER, sql criteria builder will factor it into all the NOW values determined. ================= @@ -203,6 +203,8 @@ TESTING TODO - Are all tests viable with a huge dataset, try locally and rejig t TESTING TODO - All date ranges should be on exact boundaries to ensure that all boundary date code in criteria builder is correct SQL Criteria builder - Should it really be backing off a second for boundary edges? That will mean items that are less than a second but more than zero seconds will be included whenb they shouldn't. If the sql server has 1 millesecond accuracy then it should be backed off one millisecond surely? +TESTING TODO - Re-test v7 user import, I added some code for timezone and ui color etc needs to be confirmed wont' bomb on nulls etc + INITIAL TESTING NOTES: diff --git a/server/AyaNova/biz/FilterSqlCriteriaBuilder.cs b/server/AyaNova/biz/FilterSqlCriteriaBuilder.cs index a134b80e..6f0ea5be 100644 --- a/server/AyaNova/biz/FilterSqlCriteriaBuilder.cs +++ b/server/AyaNova/biz/FilterSqlCriteriaBuilder.cs @@ -274,6 +274,9 @@ namespace AyaNova.Biz //suitable for the database to handle as all database dates are in UTC //Local display and parsing will be considered a CLIENT issue at all times + DateTime RelativeNow=DateTime.Now; + + if (sValue.StartsWith("{[") && sValue.EndsWith("]}")) { #region Build criteria for date RANGE TOKEN specified diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 1364aaf4..28ccea54 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -781,6 +781,17 @@ namespace AyaNova.Biz } } + //User options + + //TimeZone Offset + var tzo = j["TimeZoneOffset"].Value(); + i.UserOptions.TimeZoneOffset = tzo; + + //Email address + i.UserOptions.EmailAddress = j["EmailAddress"].Value(); + + //UI colour + i.UserOptions.UiColor = j["ScheduleBackColor"].Value(); //Set unusable random login credentials