#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

@ -60,6 +60,7 @@ namespace PlexRequests.UI.Modules
{
var username = (string)Request.Form.Username;
var password = (string)Request.Form.Password;
var dtOffset = (int)Request.Form.DateTimeOffset;
var userId = UserMapper.ValidateUser(username, password);
@ -72,7 +73,7 @@ namespace PlexRequests.UI.Modules
{
expiry = DateTime.Now.AddDays(7);
}
Session[SessionKeys.UsernameKey] = username;
Session[SessionKeys.ClientDateTimeOffsetKey] = dtOffset;
return this.LoginAndRedirect(userId.Value, expiry);
};