Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java	(revision 9383)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java	(revision 9383)
@@ -0,0 +1,19 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.layer.geoimage;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.io.GpxReaderTest;
+
+public class CorrelateGpxWithImagesTest {
+
+    @Test
+    public void testMatchGpxTrack() throws Exception {
+        final GpxData munich = GpxReaderTest.parseGpxData("data_nodist/munich.gpx");
+        final ImageEntry i1 = new ImageEntry();
+        i1.setExifGpsTime();
+        CorrelateGpxWithImages.matchGpxTrack(null, munich, 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 9382)
+++ trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 9383)
@@ -4,4 +4,7 @@
 import static org.junit.Assert.assertEquals;
 
+import java.util.TimeZone;
+
+import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -10,4 +13,12 @@
  */
 public class DateUtilsTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        TimeZone.setDefault(TimeZone.getTimeZone("GMT+8:00"));
+    }
 
     /**
@@ -26,3 +37,31 @@
         assertEquals(1417298930000L, DateUtils.fromString("2014-11-29 22:08:50 UTC").getTime());
     }
+
+    /**
+     * Test to parse date as used in EXIF structures.
+     */
+    @Test
+    public void testExifDate() {
+        assertEquals(1443038712000L - 8 * 3600 * 1000, DateUtils.fromString("2015:09:23 20:05:12").getTime());
+        assertEquals(1443038712888L - 8 * 3600 * 1000, DateUtils.fromString("2015:09:23 20:05:12.888").getTime());
+    }
+
+    /**
+     * Test to parse date as used in GPX files
+     */
+    @Test
+    public void testGPXDate() {
+        assertEquals(1277465405000L, DateUtils.fromString("2010-06-25T11:30:05.000Z").getTime());
+    }
+
+    /**
+     * Test to parse date as defined in <a href="https://tools.ietf.org/html/rfc3339">RFC 3339</a>
+     */
+    @Test
+    public void testRfc3339() {
+        // examples taken from RFC
+        assertEquals(482196050520L, DateUtils.fromString("1985-04-12T23:20:50.52Z").getTime());
+        assertEquals(851042397000L, DateUtils.fromString("1996-12-19T16:39:57-08:00").getTime());
+        assertEquals(-1041337172130L, DateUtils.fromString("1937-01-01T12:00:27.87+00:20").getTime());
+    }
 }
