Changeset 17749 in josm for trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
- Timestamp:
- 2021-04-11T21:56:50+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
r17747 r17749 741 741 String mv; 742 742 if ("timestamp".equals(key) && osm instanceof OsmPrimitive) { 743 mv = DateUtils.fromTimestamp(((OsmPrimitive) osm).getRawTimestamp());743 mv = ((OsmPrimitive) osm).getInstant().toString(); 744 744 } else { 745 745 mv = osm.get(key); … … 1493 1493 try { 1494 1494 // if min timestamp is empty: use lowest possible date 1495 minDate = DateUtils. fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime();1495 minDate = DateUtils.parseInstant(rangeA1.isEmpty() ? "1980" : rangeA1).toEpochMilli(); 1496 1496 } catch (UncheckedParseException | DateTimeException ex) { 1497 1497 throw new SearchParseError(tr("Cannot parse timestamp ''{0}''", rangeA1), ex); … … 1499 1499 try { 1500 1500 // if max timestamp is empty: use "now" 1501 maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils. fromString(rangeA2).getTime();1501 maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.parseInstant(rangeA2).toEpochMilli(); 1502 1502 } catch (UncheckedParseException | DateTimeException ex) { 1503 1503 throw new SearchParseError(tr("Cannot parse timestamp ''{0}''", rangeA2), ex); … … 1508 1508 @Override 1509 1509 protected Long getNumber(OsmPrimitive osm) { 1510 return osm.get Timestamp().getTime();1510 return osm.getInstant().toEpochMilli(); 1511 1511 } 1512 1512
Note:
See TracChangeset
for help on using the changeset viewer.