Javascript Date toServerTimezone()

Description

Javascript Date toServerTimezone()


Date.prototype.toServerTimezone = function () {
    var offset = new Date().getTimezoneOffset();
    this.setTime(this.getTime() - (offset * 60 * 1000));
    return this;/* w w w.  j a  va2s .c o m*/
}



PreviousNext

Related