Will TimeZone.getAvailableIDs();
get the same number of timezones regardless of what locale I'm running in?
views:
77answers:
2Yes.
TimeZone.getAvailableIDs()
returns all known time zones and has nothing to do with locale.
I am interested in why you thought it was possible that it could be different based on locale.
As Gunslinger47 points out, time zones do occasionally change and you need to either update to a new JDK/JRE or patch the old one, but again this is independent of locale.
If you have computers running in different timezones that are running the exact same Java version, then TimeZone.getAvailableIDs();
will return the same result on those computers.
However, the list can (and does) change between different Java versions (even between different update versions).
Why are you asking this question; what's the underlying problem you're trying to solve with the answer to your question? I think it's not a good idea to write a program that has expectations about what the result of TimeZone.getAvailableIDs();
looks like, since the Java API does not make any promises with regard to this.