Code example for TimeZone

Methods: setDefault

0
            jos = new JarOutputStream(new FileOutputStream(outFile));
            System.out.println("Using timezone: " + TimeZone.getDefault());
            Utils.unpackj(packFile, jos);
        } finally { 
            Utils.close(jos);
            TimeZone.setDefault(tz); // always reset
        } 
    } 
 
    static void verifyJar(File f1, File f2) throws IOException {
        int errors = 0;
        JarFile jf1 = null;
        JarFile jf2 = null;
        try { 
            jf1 = new JarFile(f1);
            jf2 = new JarFile(f2);
            System.out.println("Verifying: " + f1 + " and " + f2);
            for (JarEntry je1 : Collections.list(jf1.entries())) {
                JarEntry je2 = jf2.getJarEntry(je1.getName());
                if (je1.getTime() != je2.getTime()) {