public static synchronized void setDefault(TimeZone tz) {
        defaultZone = tz;
        java.util.TimeZone jdkZone = null;
        if (defaultZone instanceof JavaTimeZone) {
            jdkZone = ((JavaTimeZone)defaultZone).unwrap();
        } else {
            // Keep java.util.TimeZone default in sync so java.util.Date
            // can interoperate with android.icu.util classes.

            if (tz != null) {
                if (tz instanceof android.icu.impl.OlsonTimeZone) {
                    // Because of the lack of APIs supporting historic
                    // zone offset/dst saving in JDK TimeZone,
                    // wrapping ICU TimeZone with JDK TimeZone will
                    // cause historic offset calculation in Calendar/Date.
                    // JDK calendar implementation calls getRawOffset() and
                    // getDSTSavings() when the instance of JDK TimeZone
                    // is not an instance of JDK internal TimeZone subclass
                    // (sun.util.calendar.ZoneInfo).  Ticket#6459
                    String icuID = tz.getID();
                    jdkZone = java.util.TimeZone.getTimeZone(icuID);
                    if (!icuID.equals(jdkZone.getID())) {
                        // If the ID was unknown, retry with the canonicalized
                        // ID instead. This will ensure that JDK 1.1.x
                        // compatibility IDs supported by ICU (but not
                        // necessarily supported by the platform) work.
                        // Ticket#11483
                        icuID = getCanonicalID(icuID);
                        jdkZone = java.util.TimeZone.getTimeZone(icuID);
                        if (!icuID.equals(jdkZone.getID())) {
                            // JDK does not know the ID..
                            jdkZone = null;
                        }
                    }
                }
                if (jdkZone == null) {
                    jdkZone = TimeZoneAdapter.wrap(tz);
                }
            }
        }
        java.util.TimeZone.setDefault(jdkZone);
    }
public static synchronized void setDefault ( TimeZone tz ) { defaultZone = tz ; java . util . TimeZone jdkZone = null ; if ( defaultZone instanceof JavaTimeZone ) { jdkZone = ( ( JavaTimeZone ) defaultZone ) . unwrap ( ) ; } else { if ( tz != null ) { if ( tz instanceof android . icu . impl . OlsonTimeZone ) { String icuID = tz . getID ( ) ; jdkZone = java . util . TimeZone . getTimeZone ( icuID ) ; if ( ! icuID . equals ( jdkZone . getID ( ) ) ) { icuID = getCanonicalID ( icuID ) ; jdkZone = java . util . TimeZone . getTimeZone ( icuID ) ; if ( ! icuID . equals ( jdkZone . getID ( ) ) ) { jdkZone = null ; } } } if ( jdkZone == null ) { jdkZone = TimeZoneAdapter . wrap ( tz ) ; } } } java . util . TimeZone . setDefault ( jdkZone ) ; }
Sets the <code>TimeZone</code> that is
returned by the <code>getDefault</code> method.  If <code>zone</code>
is null, reset the default to the value it had originally when the
VM first started.
@param tz the new default time zone
@hide unsupported on Android