Index: trunk/src/org/openstreetmap/josm/tools/ExifReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 11483)
+++ trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 11484)
@@ -56,5 +56,5 @@
                     if (tag.getTagType() == ExifIFD0Directory.TAG_DATETIME /* 0x0132 */ ||
                         tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_DIGITIZED /* 0x9004 */) {
-                        if (dateStr != null) {
+                        if (dateStr == null) {
                             // prefer TAG_DATETIME_ORIGINAL
                             dateStr = tag.getDescription();
Index: trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 11483)
+++ trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 11484)
@@ -119,3 +119,14 @@
         assertEquals("2015-11-08T15:33:27.500", dateStr);
     }
+
+    /**
+     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/14209">#14209</a>
+     * @throws IOException if an error occurs during reading
+     */
+    @Test
+    public void testTicket14209() throws IOException {
+        File file = new File(TestUtils.getRegressionDataFile(14209, "0MbEfj1S--.1.jpg"));
+        String dateStr = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS").format(ExifReader.readTime(file));
+        assertEquals("2017-01-16T18:27:00.000", dateStr);
+    }
 }
