I want to get 1 to 24, 1 being 1am Pacific Time.
How can I get that number in Node.JS?
I want to know what time it is in Pacific time right
var date = new Date();
var year = date.getFullYear();
var month = date.getMonth() + 1;
month = (month < 10 ? "0" : "") + month;
var hour = date.getHours();
hour = (hour < 10 ? "0" : "") + hour;
var day = date.getDate();
day = (hour > 12 ? "" : "") + day - 1;
day = (day < 10 ? "0" : "") + day;
x = ":"
console.log( month + x + day + x + year )
It will display the date in the month, day, then the year