--- old/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java 2019-03-13 15:59:23.000000000 +0800 +++ new/test/jdk/sun/security/tools/jarsigner/warnings/NoTimestampTest.java 2019-03-13 15:59:23.000000000 +0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ import java.security.cert.X509Certificate; import java.util.Date; import java.util.Locale; +import java.util.TimeZone; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.util.JarUtils; @@ -59,8 +60,9 @@ } private void start() throws Throwable { - String timezone = System.getProperty("user.timezone"); + String timezone = System.getProperty("user.timezone", "UTC"); System.out.println(String.format("Timezone = %s", timezone)); + TimeZone.setDefault(TimeZone.getTimeZone(timezone)); // create a jar file that contains one class file Utils.createFiles(FIRST_FILE);