Skip to content
Advertisement

How to convert String to UTC timezone?

I have a string like this,

JavaScript

I have a utility which converts this string to UTC time

JavaScript

This returns the result 2022-12-09T12:21:32Z

It gives back the time difference of 4 hours. Shouldn’t it be 5 hours?

Advertisement

Answer

There is a time change in EST timezone on October 30th, try in September and you have only 4 hours difference and 5 hours in December.

Your can try this on this website: https://savvytime.com/converter/est-to-utc/sep-12-2022/8-30am

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement