In a web page, using Javascript, I want to display the user's local timezone information nicely. For instance, if a user from California (Pacific time) browses the web page, I want to display something like this:
Pacific Standard Time
If the long time zone name is not available then at least I want to display 'PST' in this case.
Is there a standard way to do this in Javascript? I've looked around, but couldn't find a satisfactory solution. The Date object's toLocaleString method comes close, but it's not quite what I want.
.toString()will give you inconsistent results, because the implementations are slightly different in some browsers, especially older ones.