Java Calendar get TimeZone

Description

Java Calendar get TimeZone

 
import java.util.Calendar;
import java.util.TimeZone;
 
public class Main {
 
  public static void main(String[] args) {
   /*from   ww  w .ja v  a2s  .c  o m*/
    Calendar now = Calendar.getInstance();
   
    TimeZone timeZone = now.getTimeZone();
   
    System.out.println("Current TimeZone is : " + timeZone.getDisplayName());
  }
}



PreviousNext

Related