TimeZone: getTimeZone(String ID) : TimeZone « java.util « Java by API






TimeZone: getTimeZone(String ID)

     
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;

public class Main {
  public static void main(String[] a) {
    GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("America/Chicago"),
        Locale.US);
    System.out.println(calendar);
  }
}

   
    
    
    
    
  








Related examples in the same category

1.TimeZone: getAvailableIDs()
2.TimeZone: getDefault()
3.TimeZone: getDisplayName()