fix server time offset calculation for IE10

pull/80/merge
Martin Zimmermann 10 years ago
parent e393711859
commit 4fa0f0d8ea

@ -41,7 +41,10 @@ define(["app/lib/promise", "app/globals"], function(Q, globals) {
function onload() {
globals.offset.update(new Date(xhr.getResponseHeader("Date")));
var date = xhr.getResponseHeader("Date");
if (date !== null) {
globals.offset.update(new Date(date));
}
var cookie = xhr.getResponseHeader("X-Set-Cookie");
if (cookie && cookie.match(/^isso-/)) {

@ -6,7 +6,7 @@ define(function() {
};
Offset.prototype.update = function(remoteTime) {
this.values.push((new Date()).getTime() - remoteTime);
this.values.push((new Date()).getTime() - remoteTime.getTime());
};
Offset.prototype.localTime = function() {

Loading…
Cancel
Save