Index: trunk/src/org/openstreetmap/josm/tools/ExifReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 11510)
+++ trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 11514)
@@ -44,4 +44,5 @@
             Metadata metadata = JpegMetadataReader.readMetadata(filename);
             String dateStr = null;
+            String dateTime = null;
             String subSeconds = null;
             for (Directory dirIt : metadata.getDirectories()) {
@@ -52,12 +53,13 @@
                     if (tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL /* 0x9003 */ &&
                             !tag.getDescription().matches("\\[[0-9]+ .+\\]")) {
+                        // prefer DATETIME_ORIGINAL
                         dateStr = tag.getDescription();
                     }
-                    if (tag.getTagType() == ExifIFD0Directory.TAG_DATETIME /* 0x0132 */ ||
-                        tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_DIGITIZED /* 0x9004 */) {
-                        if (dateStr == null) {
-                            // prefer TAG_DATETIME_ORIGINAL
-                            dateStr = tag.getDescription();
-                        }
+                    if (tag.getTagType() == ExifIFD0Directory.TAG_DATETIME /* 0x0132 */) {
+                        // prefer DATETIME over DATETIME_DIGITIZED
+                        dateTime = tag.getDescription();
+                    }
+                    if (tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_DIGITIZED /* 0x9004 */ && dateTime == null) {
+                        dateTime = tag.getDescription();
                     }
                     if (tag.getTagType() == ExifIFD0Directory.TAG_SUBSECOND_TIME_ORIGINAL) {
@@ -65,4 +67,7 @@
                     }
                 }
+            }
+            if (dateStr == null) {
+                dateStr = dateTime;
             }
             if (dateStr != null) {
