How can i create a utc timestamp from a given date to different timezone.
For eg:
My system timezone is currently 'America/Denver' MST and i want to create a UTC timestamp for 'Asia/Kolkata'.
new Date('2020-12-17 20:00').toLocaleString('en-US', { timeZone: 'Asia/Kolkata' })
this is giving me "12/18/2020, 8:30:00 AM" but expected result is "12/18/2020, 8:00:00 PM"
OUTPUT IN UTC:
"Fri, 18 Dec 2020 03:00:00 GMT"
Expected OUTPUT IN UTC: (Asia/kolkata)
"Fri, 17 Dec 2020 14:30:00 GMT"
How can i do that?