Index: trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 17165)
+++ trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java	(revision 17166)
@@ -8,4 +8,5 @@
 import java.io.StringReader;
 import java.text.Normalizer;
+import java.time.DateTimeException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -201,5 +202,5 @@
                                 // if min timestamp is empty: use lowest possible date
                                 minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime();
-                            } catch (UncheckedParseException ex) {
+                            } catch (UncheckedParseException | DateTimeException ex) {
                                 throw new SearchParseError(tr("Cannot parse timestamp ''{0}''", rangeA1), ex);
                             }
@@ -207,5 +208,5 @@
                                 // if max timestamp is empty: use "now"
                                 maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime();
-                            } catch (UncheckedParseException ex) {
+                            } catch (UncheckedParseException | DateTimeException ex) {
                                 throw new SearchParseError(tr("Cannot parse timestamp ''{0}''", rangeA2), ex);
                             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 17165)
+++ trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 17166)
@@ -23,4 +23,5 @@
 import java.io.File;
 import java.io.IOException;
+import java.time.DateTimeException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -879,5 +880,5 @@
                 wpt.setTime(Integer.toUnsignedLong(n.getRawTimestamp()));
             }
-        } catch (UncheckedParseException e) {
+        } catch (UncheckedParseException | DateTimeException e) {
             Logging.error(e);
         }
Index: trunk/src/org/openstreetmap/josm/io/AbstractReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 17165)
+++ trunk/src/org/openstreetmap/josm/io/AbstractReader.java	(revision 17166)
@@ -8,4 +8,5 @@
 import java.io.InputStreamReader;
 import java.text.MessageFormat;
+import java.time.DateTimeException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -45,4 +46,5 @@
 import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.UncheckedParseException;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.date.DateUtils;
@@ -425,7 +427,12 @@
 
     protected final void parseTimestamp(PrimitiveData current, String time) {
-        if (time != null && !time.isEmpty()) {
+        if (time == null || time.isEmpty()) {
+            return;
+        }
+        try {
             int timestamp = timestampCache.computeIfAbsent(time, t -> (int) (DateUtils.tsFromString(t) / 1000));
             current.setRawTimestamp(timestamp);
+        } catch (UncheckedParseException | DateTimeException e) {
+            Logging.error(e);
         }
     }
Index: trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 17165)
+++ trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 17166)
@@ -7,4 +7,5 @@
 import java.io.InputStream;
 import java.io.Reader;
+import java.time.DateTimeException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -477,5 +478,5 @@
                     try {
                         currentWayPoint.setTimeInMillis(DateUtils.tsFromString(accumulator.toString()));
-                    } catch (UncheckedParseException e) {
+                    } catch (UncheckedParseException | DateTimeException e) {
                         Logging.error(e);
                     }
