Log time needs to be UTC

This commit is contained in:
Sebastian Lohff 2017-01-23 01:55:39 +01:00
parent 41ae0219a5
commit 19c4d88fcb
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@
<div class="form-group"> <div class="form-group">
<label class="control-label">Time</label> <label class="control-label">Time</label>
<div class="controls"> <div class="controls">
<p id="id_curr_time" class="form-control-static">noot</p> <p id="id_curr_time" class="form-control-static">{% now "H:i:s" %}</p>
</div> </div>
</div> </div>
{% crispy form %} {% crispy form %}
@ -149,7 +149,7 @@ $(document).ready(function() {
function displayTimeInForm() { function displayTimeInForm() {
var d = new Date(); var d = new Date();
dstr = zeropad(d.getHours()) + ":" + zeropad(d.getMinutes()) + ":" + zeropad(d.getSeconds()); dstr = zeropad(d.getUTCHours()) + ":" + zeropad(d.getUTCMinutes()) + ":" + zeropad(d.getUTCSeconds());
$("#id_curr_time").text(dstr); $("#id_curr_time").text(dstr);
} }
window.setInterval(displayTimeInForm, 200); window.setInterval(displayTimeInForm, 200);