This means using full names instead of abbreviations,
Java docs
Three-letter time zone identifiers For compatibility with JDK 1.1.x, some other three-letter time zone identifiers (for example, "PST", "CTT", "AST") are also supported. However, their use is deprecated since the abbreviation is often used for several time zones (for example, “CST”, maybe US “Central Standard Time” and “Chinese Standard Time”), and the Java platform can then only recognize one of them.
i.e. Instead of using
TimeZone.getTimeZone("PST");
using
TimeZone.getTimeZone("America/Los_Angeles");
recommended for the above reason.
In addition, getTimeZone(String ID) returns
the specified time zone or GMT zone if this identifier cannot be understood.
Finally,
Using TimeZone.getTimeZone("GMT"); quite acceptable, as it is both ID and Name ie, this is one of the acceptable identifiers in the TimeZone.getAvailableIDs() List.
In addition, if the time zone you want is not represented by one of the supported identifiers, then a custom time zone identifier can be specified to create a TimeZone
CustomID: GMT Sign Hours : Minutes (or) GMT Sign Hours Minutes (or) GMT Sign Hours
source share