I need a way to detect the timezone of a given date object. I do NOT want the offset, nor do I want the full timezone name. I need to get the timezone abbreviation. For example, GMT, UTC, PST, MST, CST, EST, etc...
Is this possible? The closest I've gotten is parsing the result of date.toString(), but even that won't give me an abbreviation. It gives me the timezone's long name.
[sorry for how I write English]
Hi, date object doesn't have a method for get the timezone abreviation, but it is implicit there at almost end of the toString return:
for example
the output will be something like "Wed Mar 30 2011 17:29:16 GMT-0300 (ART)" so, you can isolate what is between parentheses "ART" that is the timezone abreviation
the output will be "ART"
it's to late to answer, but I hope it'll be usefull for somebody
Try Google's Closure Class goog.i18n.DateTimeSymbols and their locale related classes.