#122 store utc time in the databse + obtain timezone offset of the client upon login + offset times returned to client based on session offset

This commit is contained in:
Drewster727 2016-03-31 22:23:38 -05:00
parent ec99dafa29
commit 3dbef199aa
11 changed files with 61 additions and 11 deletions

View file

@ -68,6 +68,7 @@ namespace PlexRequests.UI.Modules
private Response LoginUser()
{
var dateTimeOffset = Request.Form.DateTimeOffset;
var username = Request.Form.username.Value;
Log.Debug("Username \"{0}\" attempting to login",username);
if (string.IsNullOrWhiteSpace(username))
@ -138,6 +139,12 @@ namespace PlexRequests.UI.Modules
Session[SessionKeys.UsernameKey] = (string)username;
}
Session[SessionKeys.ClientDateTimeOffsetKey] = (int)dateTimeOffset;
int z = 240;
return Response.AsJson(authenticated
? new JsonResponseModel { Result = true }
: new JsonResponseModel { Result = false, Message = "Incorrect User or Password"});