### Eclipse Workspace Patch 1.0
#P JOSM
Index: src/org/openstreetmap/josm/tools/date/DateUtils.java
===================================================================
--- src/org/openstreetmap/josm/tools/date/DateUtils.java	(revision 8562)
+++ src/org/openstreetmap/josm/tools/date/DateUtils.java	(working copy)
@@ -72,15 +72,15 @@
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx+xx:00") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx-xx:00")) {
             calendar.set(
-                parsePart(str, 0, 4),
-                parsePart(str, 5, 2)-1,
-                parsePart(str, 8, 2),
-                parsePart(str, 11, 2),
-                parsePart(str, 14, 2),
-                parsePart(str, 17, 2));
+                parsePart4(str, 0),
+                parsePart2(str, 5)-1,
+                parsePart2(str, 8),
+                parsePart2(str, 11),
+                parsePart2(str, 14),
+                parsePart2(str, 17));
 
             if (str.length() == 25) {
-                int plusHr = parsePart(str, 20, 2);
+                int plusHr = parsePart2(str, 20);
                 int mul = str.charAt(19) == '+' ? -3600000 : 3600000;
                 calendar.setTimeInMillis(calendar.getTimeInMillis()+plusHr*mul);
             }
@@ -91,15 +91,15 @@
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx+xx:00") ||
                 checkLayout(str, "xxxx-xx-xxTxx:xx:xx.xxx-xx:00")) {
             calendar.set(
-                parsePart(str, 0, 4),
-                parsePart(str, 5, 2)-1,
-                parsePart(str, 8, 2),
-                parsePart(str, 11, 2),
-                parsePart(str, 14, 2),
-                parsePart(str, 17, 2));
-            long millis = parsePart(str, 20, 3);
+                parsePart4(str, 0),
+                parsePart2(str, 5)-1,
+                parsePart2(str, 8),
+                parsePart2(str, 11),
+                parsePart2(str, 14),
+                parsePart2(str, 17));
+            long millis = parsePart3(str, 20);
             if (str.length() == 29)
-                millis += parsePart(str, 24, 2) * (str.charAt(23) == '+' ? -3600000 : 3600000);
+                millis += parsePart2(str, 24) * (str.charAt(23) == '+' ? -3600000 : 3600000);
             calendar.setTimeInMillis(calendar.getTimeInMillis()+millis);
 
             return calendar.getTime();
@@ -141,10 +141,18 @@
         return true;
     }
 
-    private static int parsePart(String str, int off, int len) {
-        return Integer.parseInt(str.substring(off, off+len));
+    private static int parsePart2(String str, int off) {
+        return 10 * (str.charAt(off) - '0') + (str.charAt(off + 1) - '0');
     }
 
+    private static int parsePart3(String str, int off) {
+        return 100 * (str.charAt(off) - '0') + 10 * (str.charAt(off + 1) - '0') + (str.charAt(off + 2) - '0');
+    }
+
+    private static int parsePart4(String str, int off) {
+        return 1000 * (str.charAt(off) - '0') + 100 * (str.charAt(off + 1) - '0')  + 10 * (str.charAt(off + 2) - '0') + (str.charAt(off + 3) - '0');
+    }
+
     /**
      * Returns a new {@code SimpleDateFormat} for date only, according to <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>.
      * @return a new ISO 8601 date format, for date only.
