Index: trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java	(revision 17746)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java	(revision 17749)
@@ -14,5 +14,4 @@
 import java.time.Instant;
 import java.util.Arrays;
-import java.util.Date;
 
 import org.junit.jupiter.api.AfterEach;
@@ -25,5 +24,4 @@
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.openstreetmap.josm.tools.date.DateUtils;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -307,5 +305,5 @@
         n.put("key1", "value1");
         n.setUser(myUser);
-        n.setTimestamp(new Date());
+        n.setInstant(Instant.now());
 
         my.addPrimitive(n);
@@ -314,5 +312,5 @@
         n1.setCoor(LatLon.ZERO);
         n1.put("key1", "value1");
-        n1.setTimestamp(Date.from(Instant.now().plusSeconds(3600)));
+        n1.setInstant(Instant.now().plusSeconds(3600));
         n1.setUser(theirUser);
         their.addPrimitive(n1);
@@ -346,5 +344,5 @@
         n1.setOsmId(1, 1);
         n1.put("key1", "value1");
-        n1.setTimestamp(new Date());
+        n1.setInstant(Instant.now());
         their.addPrimitive(n1);
 
@@ -646,5 +644,5 @@
         User user = User.createOsmUser(1111, "their");
         theirWay.setUser(user);
-        theirWay.setTimestamp(new Date());
+        theirWay.setInstant(Instant.now());
         their.addPrimitive(theirWay);
 
@@ -699,5 +697,5 @@
         User user = User.createOsmUser(1111, "their");
         theirWay.setUser(user);
-        theirWay.setTimestamp(new Date());
+        theirWay.setInstant(Instant.now());
         their.addPrimitive(theirWay);
 
@@ -754,5 +752,5 @@
         theirWay.addNode(tn3);
         theirWay.setUser(User.createOsmUser(1111, "their"));
-        theirWay.setTimestamp(new Date());
+        theirWay.setInstant(Instant.now());
         their.addPrimitive(theirWay);
 
@@ -1182,5 +1180,5 @@
         Node nA = new Node(2848219691L, 1);
         nA.setCoor(LatLon.ZERO);
-        nA.setTimestamp(DateUtils.fromString("2014-05-10T14:25:40Z"));
+        nA.setInstant(Instant.parse("2014-05-10T14:25:40Z"));
         nA.setChangesetId(22251108);
         nA.setUser(User.createOsmUser(385987, "yaho"));
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 17746)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java	(revision 17749)
@@ -13,4 +13,5 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
+import java.time.Instant;
 import java.util.Arrays;
 import java.util.Collection;
@@ -44,5 +45,4 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.Logging;
-import org.openstreetmap.josm.tools.date.DateUtils;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -449,5 +449,5 @@
     void testTimestamp() throws SearchParseError {
         final Node n1 = new Node();
-        n1.setTimestamp(DateUtils.fromString("2010-01-22"));
+        n1.setInstant(Instant.parse("2010-01-22T00:00:00Z"));
         assertTrue(SearchCompiler.compile("timestamp:2010/2011").match(n1));
         assertTrue(SearchCompiler.compile("timestamp:2010-01/2011").match(n1));
@@ -455,5 +455,5 @@
         assertFalse(SearchCompiler.compile("timestamp:2010-01-23/2011").match(n1));
         assertFalse(SearchCompiler.compile("timestamp:2010/2010-01-21").match(n1));
-        n1.setTimestamp(DateUtils.fromString("2016-01-22"));
+        n1.setInstant(Instant.parse("2016-01-22T00:00:00Z"));
         assertFalse(SearchCompiler.compile("timestamp:2010/2011").match(n1));
     }
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 17746)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmJsonReaderTest.java	(revision 17749)
@@ -9,4 +9,5 @@
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
+import java.time.Instant;
 import java.util.Iterator;
 
@@ -131,5 +132,5 @@
         assertEquals(1, n.getUniqueId());
         assertEquals(new LatLon(2.0, -3.0), n.getCoor());
-        assertEquals("2018-01-01T00:00:00Z", DateUtils.newIsoDateTimeFormat().format(n.getTimestamp()));
+        assertEquals(Instant.parse("2018-01-01T00:00:00Z"), n.getInstant());
         assertEquals(4, n.getVersion());
         assertEquals(5, n.getChangesetId());
Index: trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 17746)
+++ trunk/test/unit/org/openstreetmap/josm/io/OsmWriterTest.java	(revision 17749)
@@ -24,4 +24,6 @@
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.DownloadPolicy;
+import org.openstreetmap.josm.data.osm.INode;
+import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.NodeData;
 import org.openstreetmap.josm.data.osm.UploadPolicy;
@@ -127,3 +129,20 @@
         }
     }
+
+    /**
+     * Unit test of {@link OsmWriter#visit(INode)}.
+     * @throws IOException if an I/O error occurs
+     */
+    @Test
+    void testNode() throws IOException {
+        Node node = new Node(1, 42);
+        node.setCoor(new LatLon(12., 34.));
+        node.setInstant(Instant.parse("2006-05-10T18:27:47Z"));
+        try (StringWriter stringWriter = new StringWriter();
+             OsmWriter osmWriter = OsmWriterFactory.createOsmWriter(new PrintWriter(stringWriter), true, OsmWriter.DEFAULT_API_VERSION)) {
+            osmWriter.visit(node);
+            assertEquals("  <node id='1' timestamp='2006-05-10T18:27:47Z' visible='true' version='42' lat='12.0' lon='34.0' />\n",
+                    stringWriter.toString().replace("\r", ""));
+        }
+    }
 }
