Getting TimeZone string from date in IE

Google chrome

new Date() //returns Fri Mar 29 2013 17:55:25 GMT+0530 (IST) 

IE8

 new Date() //returns Fri Mar 29 17:48:46 UTC+0530 2013 

I need to extract the (IST) from Date on IE, On chrome I could do dateString.substring to extract it, but in IE I cannot do this.

The getTimeZoneOffset method gives me the offset in minutes, is there a way to get the string using the offset?

Or do I need to examine all lines of the time zone corresponding to offsets and create an object from it, and then use it?

+6
source share
2 answers

Could this be helpful to you?

jsTimezoneDetect

It may also be relevant to read: How to determine the time zone from a UTC offset?

+4
source

I don't think there is a way to do what you reliably hope in a standard JS date object, but here are some libraries that can help you:

Perhaps one of them will provide you with the information you are looking for.

hope this helps.

+1
source

All Articles