< prev index next >

src/java.base/share/classes/java/time/ZoneId.java

Print this page

        

@@ -59,10 +59,12 @@
  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 package java.time;
 
+import sun.misc.SharedSecrets;
+
 import java.io.DataOutput;
 import java.io.IOException;
 import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
 import java.io.Serializable;

@@ -269,11 +271,11 @@
      * @return the zone ID, not null
      * @throws DateTimeException if the converted zone ID has an invalid format
      * @throws ZoneRulesException if the converted zone region ID cannot be found
      */
     public static ZoneId systemDefault() {
-        return TimeZone.getDefault().toZoneId();
+        return SharedSecrets.getJavaUtilTimeZoneAccess().getDefaultRef().toZoneId();
     }
 
     /**
      * Gets the set of available zone IDs.
      * <p>
< prev index next >