Java TimeZone.getID()
Syntax
TimeZone.getID() has the following syntax.
public String getID()
Example
In the following code shows how to use TimeZone.getID() method.
/*from w w w . j a v a 2 s. c om*/
import java.util.TimeZone;
public class Main {
public static void main( String args[] ){
TimeZone timezone = TimeZone.getTimeZone("Europe/Paris");
// checking ID of this time zone
System.out.println("ID value is :" + timezone.getID());
}
}
The code above generates the following result.
Home »
Java Tutorial »
java.util »
Java Tutorial »
java.util »