Hi all im looking for a way to get current system time in a timestamp. i used this to get timestamp:
new Date().getTime();
but it return the time in UTC timezone not the timezone that server use
is there any way to get timestamp with system timezone?
Check out moment.js http://momentjs.com/
npm install -S moment
New moment objects will by default have the system timezone offset.
var now = moment()
var formatted = now.format('YYYY-MM-DD HH:mm:ss Z')
console.log(formatted)