Index: trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java	(revision 17841)
@@ -16,5 +16,4 @@
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.LinkedList;
@@ -924,9 +923,9 @@
     private final transient Stack<ZoomData> zoomUndoBuffer = new Stack<>();
     private final transient Stack<ZoomData> zoomRedoBuffer = new Stack<>();
-    private Date zoomTimestamp = new Date();
+    private long zoomTimestamp = System.currentTimeMillis();
 
     private void pushZoomUndo(EastNorth center, double scale) {
-        Date now = new Date();
-        if ((now.getTime() - zoomTimestamp.getTime()) > (Config.getPref().getDouble("zoom.undo.delay", 1.0) * 1000)) {
+        long now = System.currentTimeMillis();
+        if ((now - zoomTimestamp) > (Config.getPref().getDouble("zoom.undo.delay", 1.0) * 1000)) {
             zoomUndoBuffer.push(new ZoomData(center, scale));
             if (zoomUndoBuffer.size() > Config.getPref().getInt("zoom.undo.max", 50)) {
Index: trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 17841)
@@ -7,10 +7,10 @@
 import java.awt.event.ActionEvent;
 import java.net.HttpURLConnection;
-import java.text.DateFormat;
+import java.time.Instant;
+import java.time.format.FormatStyle;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Date;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -215,9 +215,9 @@
      * @param d changeset date
      */
-    protected void handleUploadConflictForClosedChangeset(long changesetId, Date d) {
+    protected void handleUploadConflictForClosedChangeset(long changesetId, Instant d) {
         String msg = tr("<html>Uploading <strong>failed</strong> because you have been using<br>"
                 + "changeset {0} which was already closed at {1}.<br>"
                 + "Please upload again with a new or an existing open changeset.</html>",
-                changesetId, DateUtils.formatDateTime(d, DateFormat.SHORT, DateFormat.SHORT)
+                changesetId, DateUtils.getDateTimeFormatter(FormatStyle.SHORT, FormatStyle.SHORT).format(d)
         );
         JOptionPane.showMessageDialog(
@@ -293,5 +293,5 @@
             m = p.matcher(errorHeader);
             if (m.matches()) {
-                handleUploadConflictForClosedChangeset(Long.parseLong(m.group(1)), DateUtils.fromString(m.group(2)));
+                handleUploadConflictForClosedChangeset(Long.parseLong(m.group(1)), DateUtils.parseInstant(m.group(2)));
                 return;
             }
Index: trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java	(revision 17841)
@@ -26,5 +26,5 @@
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.text.SimpleDateFormat;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -32,5 +32,4 @@
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.Date;
 import java.util.LinkedList;
 import java.util.List;
@@ -479,5 +478,5 @@
                     String value = e.getValue();
                     if ("lastModification".equals(e.getKey()) || "expirationTime".equals(e.getKey())) {
-                        value = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.parseLong(value)));
+                        value = Instant.ofEpochMilli(Long.parseLong(value)).toString();
                     }
                     panel.add(layer.createTextField(value), GBC.eol().fill(GBC.HORIZONTAL));
Index: trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java	(revision 17841)
@@ -14,4 +14,5 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -190,9 +191,9 @@
     }
 
-    protected File getNewLayerFile(AutosaveLayerInfo<?> layer, Date now, int startIndex) {
+    protected File getNewLayerFile(AutosaveLayerInfo<?> layer, Instant now, int startIndex) {
         int index = startIndex;
         while (true) {
             String filename = String.format(Locale.ENGLISH, "%1$s_%2$tY%2$tm%2$td_%2$tH%2$tM%2$tS%2$tL%3$s",
-                    layer.layerFileName, now, index == 0 ? "" : ('_' + Integer.toString(index)));
+                    layer.layerFileName, Date.from(now), index == 0 ? "" : ('_' + Integer.toString(index)));
             File result = new File(autosaveDir, filename + '.' +
                     (layer.layer instanceof NoteLayer ?
@@ -234,5 +235,5 @@
             Data data = info.layer.getData();
             if (data != null && changedData.remove(data)) {
-                File file = getNewLayerFile(info, new Date(), 0);
+                File file = getNewLayerFile(info, Instant.now(), 0);
                 if (file != null) {
                     info.backupFiles.add(file);
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 17841)
@@ -16,5 +16,4 @@
 import java.util.Arrays;
 import java.util.Comparator;
-import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -328,5 +327,5 @@
                 JComponent jc = (JComponent) c;
                 Object value = getValueAt(row, col);
-                jc.setToolTipText(col == 2 ? Arrays.toString((Date[]) value) : String.valueOf(value));
+                jc.setToolTipText(col == 2 ? Arrays.toString((Instant[]) value) : String.valueOf(value));
                 if (content.length > row
                         && content[row].length > 5
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LafPreference.java	(revision 17841)
@@ -6,6 +6,8 @@
 import java.awt.Component;
 import java.awt.GridBagLayout;
-import java.text.DateFormat;
-import java.util.Date;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.time.format.FormatStyle;
 
 import javax.swing.BorderFactory;
@@ -177,9 +179,9 @@
         panel.add(dynamicButtons, GBC.eop().insets(20, 0, 0, 0));
 
-        Date today = new Date();
+        LocalDate today = LocalDate.now(ZoneId.systemDefault());
         isoDates.setToolTipText(tr("Format dates according to {0}. Today''s date will be displayed as {1} instead of {2}",
                 tr("ISO 8601"),
-                DateUtils.newIsoDateFormat().format(today),
-                DateFormat.getDateInstance(DateFormat.SHORT).format(today)));
+                today.toString(),
+                DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).format(today)));
         isoDates.setSelected(DateUtils.PROP_ISO_DATES.get());
         panel.add(isoDates, GBC.eop().insets(20, 0, 0, 0));
Index: trunk/src/org/openstreetmap/josm/io/ValidatorErrorWriter.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/ValidatorErrorWriter.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/io/ValidatorErrorWriter.java	(revision 17841)
@@ -8,7 +8,7 @@
 import java.io.PrintWriter;
 import java.nio.charset.StandardCharsets;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -32,5 +32,4 @@
 import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.Logging;
-import org.openstreetmap.josm.tools.date.DateUtils;
 
 /**
@@ -65,5 +64,5 @@
     public void write(Collection<TestError> validationErrors) throws IOException {
         Set<Test> analysers = validationErrors.stream().map(TestError::getTester).collect(Collectors.toCollection(TreeSet::new));
-        String timestamp = DateUtils.fromDate(new Date());
+        String timestamp = Instant.now().toString();
 
         out.println("<?xml version='1.0' encoding='UTF-8'?>");
Index: trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java	(revision 17840)
+++ trunk/src/org/openstreetmap/josm/io/nmea/NmeaReader.java	(revision 17841)
@@ -9,4 +9,5 @@
 import java.text.ParsePosition;
 import java.text.SimpleDateFormat;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -176,5 +177,5 @@
     private final SimpleDateFormat rmcTimeFmt = new SimpleDateFormat("ddMMyyHHmmss.SSS", Locale.ENGLISH);
 
-    private Date readTime(String p) throws IllegalDataException {
+    private Instant readTime(String p) throws IllegalDataException {
         // NMEA defines time with "a variable number of digits for decimal-fraction of seconds"
         // This variable decimal fraction cannot be parsed by SimpleDateFormat
@@ -190,5 +191,5 @@
             Date d = rmcTimeFmt.parse(date, new ParsePosition(0));
             if (d != null)
-                return d;
+                return d.toInstant();
         }
         throw new IllegalDataException("Date is malformed: '" + p + "'");
@@ -355,5 +356,5 @@
                 // time
                 accu = e[GGA.TIME.position];
-                Date d = readTime(currentDate+accu);
+                Instant instant = readTime(currentDate+accu);
 
                 if ((ps.pTime == null) || (currentwp == null) || !ps.pTime.equals(accu)) {
@@ -366,5 +367,5 @@
                     // As this sentence has no complete time only use it
                     // if there is no time so far
-                    currentwp.setInstant(d.toInstant());
+                    currentwp.setInstant(instant);
                 }
                 // elevation
@@ -486,5 +487,5 @@
                 String time = e[RMC.TIME.position];
 
-                Date d = readTime(currentDate+time);
+                Instant instant = readTime(currentDate+time);
 
                 if (ps.pTime == null || currentwp == null || !ps.pTime.equals(time)) {
@@ -494,5 +495,5 @@
                 }
                 // time: this sentence has complete time so always use it.
-                currentwp.setInstant(d.toInstant());
+                currentwp.setInstant(instant);
                 // speed
                 accu = e[RMC.SPEED.position];
