jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java
changeset 40393 cb883ad42653
parent 40253 08809866c0bc
child 41960 916bb3d29d7b
--- a/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Aug 16 12:34:00 2016 +0530
+++ b/jdk/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Aug 16 21:28:10 2016 +0800
@@ -3631,8 +3631,8 @@
                 if (time != null) {
                     if (time.matches("\\d\\d:\\d\\d:\\d\\d")) {
                         c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(time.substring(0, 2)));
-                        c.set(Calendar.MINUTE, Integer.valueOf(time.substring(0, 2)));
-                        c.set(Calendar.SECOND, Integer.valueOf(time.substring(0, 2)));
+                        c.set(Calendar.MINUTE, Integer.valueOf(time.substring(3, 5)));
+                        c.set(Calendar.SECOND, Integer.valueOf(time.substring(6, 8)));
                         c.set(Calendar.MILLISECOND, 0);
                     } else {
                         throw ioe;