mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
#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:
parent
ec99dafa29
commit
3dbef199aa
11 changed files with 61 additions and 11 deletions
|
@ -6,6 +6,7 @@
|
|||
Remember Me <input name="RememberMe" type="checkbox" value="True"/>
|
||||
<br/><br/>
|
||||
<input class="btn btn-success-outline" type="submit" value="Login"/>
|
||||
<input type="hidden" id="DateTimeOffset" name="DateTimeOffset" />
|
||||
</form>
|
||||
@if (!Model.AdminExists)
|
||||
{
|
||||
|
@ -19,3 +20,9 @@
|
|||
</div>
|
||||
}
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
var dtOffset = new Date().getTimezoneOffset();
|
||||
$('#DateTimeOffset').val(dtOffset);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<form method="POST">
|
||||
Username <input class="form-control" type="text" name="Username" />
|
||||
Username <input class="form-control form-control-custom" type="text" name="Username" />
|
||||
<br />
|
||||
Password <input class="form-control" name="Password" type="password" />
|
||||
Password <input class="form-control form-control-custom" name="Password" type="password" />
|
||||
<br />
|
||||
<br />
|
||||
<input class="btn btn-success-outline" type="submit" value="Create User" />
|
||||
|
|
|
@ -38,10 +38,14 @@
|
|||
$('#loginBtn').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#loginForm");
|
||||
var formData = $form.serialize();
|
||||
var dtOffset = new Date().getTimezoneOffset();
|
||||
formData += ('&DateTimeOffset=' + dtOffset)
|
||||
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: $form.prop("action"),
|
||||
data: $form.serialize(),
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue