fix server time offset calculation for IE10
This commit is contained in:
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…
Reference in New Issue
Block a user