How can I create a new Date() value set to a specific timezone -- and get the timezone offset programatically? Right now I'm hard coding the timezone but these change throughout the year with daylight savings etc.
var dateInTimezone = new Date("2020-03-03 10:00:00 UTC+8:00");
Is there a way to set new Date( date + getTimezoneVal )?
Example scenario:
Submitting a date (ie. 2020-03-03 @ 10am) via a form -- but set the timestamp to 2020-03-03 10am HKT while you're in NYC.
How can I create a new Date() value set to a specific timezone -- and get the timezone offset programatically? Right now I'm hard coding the timezone but these change throughout the year with daylight savings etc.
var dateInTimezone = new Date("2020-03-03 10:00:00 UTC+8:00");
Is there a way to set new Date( date + getTimezoneVal )?
Example scenario: Submitting a date (ie. 2020-03-03 @ 10am) via a form -- but set the timestamp to 2020-03-03 10am HKT while you're in NYC.