1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 08:04:49 +01:00

wombat: fix Date overrides, ensure use of overriden functions

This commit is contained in:
Ilya Kreymer 2015-07-16 12:24:44 -07:00
parent 3808609fbc
commit b92d75ff9b

View File

@ -760,7 +760,7 @@ var wombat_internal = function(window) {
//var timezone = new Date().getTimezoneOffset() * 60 * 1000;
// Already UTC!
var timezone = 0;
var timediff = Date.now() - (timestamp - timezone);
var timediff = window.Date.now() - (timestamp - timezone);
window.__Date = window.Date;
window.__Date_now = window.Date.now;
@ -773,7 +773,7 @@ var wombat_internal = function(window) {
// seem to like undefined args, so must explicitly
// call constructor for each possible args 0..7
if (A === undefined) {
return new Date(window.Date.now());
return new Date(Date.now());
} else if (B === undefined) {
return new Date(A);
} else if (C === undefined) {