Changeset 15869 in josm for trunk/src/org
- Timestamp:
- 2020-02-16T23:42:59+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r15250 r15869 104 104 if (str.length() == 22 || str.length() == 25) { 105 105 final int plusHr = parsePart2(str, 20); 106 final long mul = str.charAt(19) == '+' ? -1 : 1; 107 return local.plusHours(plusHr * mul).toInstant().toEpochMilli(); 106 return local.plusHours(str.charAt(19) == '+' ? -plusHr : plusHr).toInstant().toEpochMilli(); 108 107 } 109 108 return local.toInstant().toEpochMilli(); … … 125 124 if (str.length() == 29) { 126 125 final int plusHr = parsePart2(str, 24); 127 final long mul = str.charAt(23) == '+' ? -1 : 1; 128 return local.plusHours(plusHr * mul).toInstant().toEpochMilli(); 126 return local.plusHours(str.charAt(23) == '+' ? -plusHr : plusHr).toInstant().toEpochMilli(); 129 127 } 130 128 return local.toInstant().toEpochMilli();
Note:
See TracChangeset
for help on using the changeset viewer.