Home » openjdk-7 » java » util » [javadoc | source]
final class: VMTimeZone [javadoc | source]
Method from java.util.VMTimeZone Summary:
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.VMTimeZone Detail:
 static TimeZone getDefaultTimeZoneId() 
    This method returns a time zone id string which is in the form (standard zone name) or (standard zone name)(GMT offset) or (standard zone name)(GMT offset)(daylight time zone name). The GMT offset can be in seconds, or where it is evenly divisible by 3600, then it can be in hours. The offset must be the time to add to the local time to get GMT. If a offset is given and the time zone observes daylight saving then the (daylight time zone name) must also be given (otherwise it is assumed the time zone does not observe any daylight savings).

    The result of this method is given to the method TimeZone.getDefaultTimeZone(String) which tries to map the time zone id to a known TimeZone. See that method on how the returned String is mapped to a real TimeZone object.

    The reference implementation which is made for GNU/Posix like systems calls System.getenv("TZ"), readTimeZoneFile("/etc/timezone"), readtzFile("/etc/localtime") and finally getSystemTimeZoneId() till a supported TimeZone is found through TimeZone.getDefaultTimeZone(String). If every method fails null is returned (which means the TimeZone code will fall back on GMT as default time zone).

    Note that this method is called inside a AccessController.doPrivileged() block and runs with the priviliges of the java.util system classes. It will only be called when the default time zone is not yet set, the system property user.timezone isn't set and it is requested for the first time.