Nodejs Date GMT UTC Get utc()

Here you can find the source of utc()

Method Source Code

Date.prototype.utc = function(){
  return new Date();
};

Related

  1. utc(func)
    Date.prototype.utc = function(func) {
        "use strict";
        return new Date(this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(),  this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds());
    };
    
  2. utcZero()
    Date.prototype.utcZero = function(){
      return new Date(this.getTime() + this.getTimezoneOffset()*60*1000);
    };
    
  3. getTimeUTC()
    Date.prototype.getTimeUTC = function () {
        return this.getTime() + this.getTimezoneOffset() * 60 * 1000;
    };
    
  4. getUTCFullDate()
    Date.prototype.getUTCFullDate = function() {
      return this.getUTCFullYear() + '-' + (this.getUTCMonth() + 1) + '-' + this.getUTCDate();
    };