This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Date.prototype.toLocalTime = function() { | |
// PDT -0700 = -7 * 60 = -420 minutes in the timezone offset from GMT to PDT | |
var nMillisecondsInMinute = 60000; | |
var nMillisecondsThis = this.getTime(); | |
// Compensate for the GMT-stored time on production | |
if (isProduction) | |
nMillisecondsThis -= (420 * nMillisecondsInMinute); | |
return new Date(nMillisecondsThis); | |
}; |