Index: src/org/openstreetmap/josm/actions/search/SearchCompiler.java
===================================================================
--- src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(revision 6094)
+++ src/org/openstreetmap/josm/actions/search/SearchCompiler.java	(working copy)
@@ -150,7 +150,7 @@
                         String rangeA1 = rangeA[0].trim();
                         String rangeA2 = rangeA[1].trim();
                         long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime(); // if min timestap is empty: use lowest possible date
-                        long maxDate = rangeA2.isEmpty() ? new Date().getTime() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now"
+                        long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now"
                         return new TimestampRange(minDate, maxDate);
                     } else
                         /*
Index: src/org/openstreetmap/josm/gui/layer/GpxLayer.java
===================================================================
--- src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(revision 6094)
+++ src/org/openstreetmap/josm/gui/layer/GpxLayer.java	(working copy)
@@ -121,7 +121,7 @@
     */
     public Date[] getMinMaxTimeForAllTracks() {
         double min=1e100, max=-1e100, t;
-        double now = new Date().getTime()/1000.0;
+        double now = System.currentTimeMillis()/1000.0;
         for (GpxTrack trk: data.tracks) {
             for (GpxTrackSegment seg : trk.getSegments()) {
                 for (WayPoint pnt : seg.getWayPoints()) {
@@ -532,7 +532,7 @@
                 }
                 oldWp = null;
             }
-            double now = new Date().getTime()/1000.0;
+            double now = System.currentTimeMillis()/1000.0;
             if (colored == colorModes.time) {
                 Date[] bounds = getMinMaxTimeForAllTracks();
                 if (bounds!=null) {
Index: src/org/openstreetmap/josm/io/CacheCustomContent.java
===================================================================
--- src/org/openstreetmap/josm/io/CacheCustomContent.java	(revision 6094)
+++ src/org/openstreetmap/josm/io/CacheCustomContent.java	(working copy)
@@ -86,7 +86,7 @@
      * @return Returns the data
      */
     public byte[] updateIfRequired() throws T {
-        if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < new Date().getTime()/1000
+        if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < System.currentTimeMillis()/1000
                 || !isCacheValid())
             return updateForce();
         return getData();
@@ -97,7 +97,7 @@
      * @return Returns the data as string
      */
     public String updateIfRequiredString() throws T {
-        if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < new Date().getTime()/1000
+        if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < System.currentTimeMillis()/1000
                 || !isCacheValid())
             return updateForceString();
         return getDataString();
@@ -110,7 +110,7 @@
     public byte[] updateForce() throws T {
         this.data = updateData();
         saveToDisk();
-        Main.pref.putInteger("cache." + ident, (int)(new Date().getTime()/1000));
+        Main.pref.putInteger("cache." + ident, (int)(System.currentTimeMillis()/1000));
         return data;
     }
 
Index: src/org/openstreetmap/josm/io/CacheFiles.java
===================================================================
--- src/org/openstreetmap/josm/io/CacheFiles.java	(revision 6094)
+++ src/org/openstreetmap/josm/io/CacheFiles.java	(working copy)
@@ -109,7 +109,7 @@
 
             // Update last mod time so we don't expire recently used data
             if(updateModTime) {
-                data.setLastModified(new Date().getTime());
+                data.setLastModified(System.currentTimeMillis());
             }
 
             byte[] bytes = new byte[(int) data.length()];
@@ -161,7 +161,7 @@
             }
             // Update last mod time so we don't expire recently used images
             if(updateModTime) {
-                img.setLastModified(new Date().getTime());
+                img.setLastModified(System.currentTimeMillis());
             }
             return ImageIO.read(img);
         } catch(Exception e) {
@@ -353,6 +353,6 @@
     private boolean isExpired(File file) {
         if(CacheFiles.EXPIRE_NEVER == this.expire)
             return false;
-        return (file.lastModified() < (new Date().getTime() - expire*1000));
+        return (file.lastModified() < (System.currentTimeMillis() - expire*1000));
     }
 }
