Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting the TimeZone string from a Date on 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 (IST) part from the Date on IE,On chrome I could do dateString.substring to extract it but on IE I cannot do that.

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

Or do I need to research for all the timezone strings corresponding to the offsets and create an object out of it & then use it ?

like image 758
Mudassir Ali Avatar asked Mar 29 '13 12:03

Mudassir Ali


1 Answers

Can this be of service to you?

jsTimezoneDetect

Also this might also be a relevant read: How can I determine a timezone by the UTC offset?

like image 101
OpherV Avatar answered Oct 11 '22 15:10

OpherV