CEST to UTC converter to convert between CEST (Central European Summer Time) and UTC (Coordinated Universal Time). Convert any CEST time to UTC quickly and accurately. Convert date time from one time zone to another with formula. For example, date time in cell A2:A10 is the Pacific Standard Time (PST), and you may need to convert these time to Beijing time. Convert date time from one time zone to another with formula. For example, date time in cell A2:A10 is the Pacific Standard Time (PST), and you may need to convert these time to Beijing time.You can apply the following formula to achieve it. Based International Air Transport Association (IATA) timezone codes. Time zones use hours and minutes offset from Coordinated Universal Time (UTC), most a whole number of hours, a few are offset by 30 or 45 minutes.
DST is such a pain when it comes to programming. Hulkageddon. I wish they just get rid of it. It’d be helpful; however, the programmers will still have to deal with the timezones. I was answering questions related to the timers on this website and I keep getting a lot of questions on DST and the timezones. Even though it seems easy, this topic is very confusing. There are lot many sources on the Internet and reading them confuses the hell out of me.
Let the date in question be in Indian Standard Time (IST)
January 02, 2012 22:00:00 GMT+0530
Cst To Utc+8
How to convert the date into a local time(CST)?
How to convert a date to UTC?
This is where many of the online sources go wrong. The simple answer is to convert the date into milliseconds since Epoch and add the timezone offset and convert it back to a date object. Simple? No, this is partially correct. When the calculated milliseconds are converted back to a date, you get a local date.
Notice the GMT-0600 (CST) part at the end. That means the resulting date is not GMT, it is CST. If you convert this date to GMT it will read -
Mon Jan 02 2012 22:30:00 GMT but we want it to be
Mon Jan 02 2012 16:30:00 GMT
There is also another incorrect way mentioned all over the Internet -
The result will be no different than the one that you see above.
Cst To Utc-3
How to convert the local date to UTC date?
How to get the local date from the UTC date?
Cst To Utc+4
That is a long string to store, is there any alternative to store the UTC time?
Just store the number of milliseconds since Epoch converted to UTC by adding the timezone offset.
Cst To Utc Time Conversion
How to convert the milliseconds in UTC to local date?
6pm Cst To Utc
Subtract the timezone offset.
The code from above is used in this demo page. Let me know if you have any questions or comments.
Update: moved the code to github