Reputation: 109
I currently have this code below in javascript but it is currently at it's default timezone which is PST but I want it to be UTC by default or a way to convert it to UTC.
What are some ways around it?
var now = new Date().getTime();
Upvotes: 0
Views: 388
Reputation: 18975
You can use var now = new Date().toISOString();
var now = new Date().toISOString();
console.log(now)
Upvotes: 1