TimeZone: getDisplayName() : TimeZone « java.util « Java by API






TimeZone: getDisplayName()

 
import java.util.Calendar;
import java.util.TimeZone;

public class Main {

  public static void main(String[] args) {
    Calendar now = Calendar.getInstance();
    TimeZone timeZone = now.getTimeZone();
    System.out.println("Current TimeZone is : " + timeZone.getDisplayName());
  }
}

   
  








Related examples in the same category

1.TimeZone: getAvailableIDs()
2.TimeZone: getDefault()
3.TimeZone: getTimeZone(String ID)