I have a Date object, let's say:
const d = new Date('2014-12-01T12:00:00Z');
And I have a timezone name, let's say:
const timezoneName = 'America/New_York';
What would be an elegant way to create another Date object (or just getting its UTC timestamp) with the same date, but at 9:00am of timezone (by timezoneName)?
I could convert d
to a String using toLocaleString
and then manipulate this string and then convert it back to Date, but I don't think it's a very elegant solution.
I don't mind using moment.js
Thank you in advance :)