Return | Method | Summary |
---|---|---|
String | getDisplayName() | Returns a name of this time zone suitable for presentation to the user in the default locale. |
String | getDisplayName(boolean daylight, int style) | Returns a name of this time zone suitable for presentation to the user in the default locale. |
String | getDisplayName(boolean daylight, int style, Locale locale) | Returns a name of this time zone suitable for presentation to the user in the specified locale. |
String | getDisplayName(Locale locale) | Returns a name of this time zone suitable for presentation to the user in the specified locale. |
import java.util.TimeZone;
public class Main {
public static void main(String[] args) {
TimeZone tz = TimeZone.getTimeZone("America/New_York");
System.out.println(tz.getDisplayName());
}
}
The output:
Eastern Standard Time
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |