Index: applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java
===================================================================
--- applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java	(revision 35221)
+++ applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/gpx/ElevationProfile.java	(revision 35444)
@@ -121,6 +121,6 @@
             return;
 
-        start = new Date();
-        end = new Date(0L);
+        start = new Date(0L);
+        end = new Date();
         this.minHeight = Integer.MAX_VALUE;
         this.maxHeight = Integer.MIN_VALUE;
@@ -196,5 +196,6 @@
     protected void setStart(WayPoint wp) {
         importantWayPoints[WAYPOINT_START] = wp;
-        this.start = wp.getDate();
+        if(wp.getDate() != null)
+        	this.start = wp.getDate();
     }
 
@@ -204,5 +205,6 @@
     protected void setEnd(WayPoint wp) {
         importantWayPoints[WAYPOINT_END] = wp;
-        this.end = wp.getDate();
+        if(wp.getDate() != null)
+        	this.end = wp.getDate();
     }
 
