- Timestamp:
- 2013-08-02T23:14:44+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r6087 r6102 10 10 import java.util.Arrays; 11 11 import java.util.Collection; 12 import java.util.Date;13 12 import java.util.HashMap; 14 13 import java.util.Map; … … 151 150 String rangeA2 = rangeA[1].trim(); 152 151 long minDate = DateUtils.fromString(rangeA1.isEmpty() ? "1980" : rangeA1).getTime(); // if min timestap is empty: use lowest possible date 153 long maxDate = rangeA2.isEmpty() ? new Date().getTime() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now"152 long maxDate = rangeA2.isEmpty() ? System.currentTimeMillis() : DateUtils.fromString(rangeA2).getTime(); // if max timestamp is empty: use "now" 154 153 return new TimestampRange(minDate, maxDate); 155 154 } else -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r6093 r6102 122 122 public Date[] getMinMaxTimeForAllTracks() { 123 123 double min=1e100, max=-1e100, t; 124 double now = new Date().getTime()/1000.0;124 double now = System.currentTimeMillis()/1000.0; 125 125 for (GpxTrack trk: data.tracks) { 126 126 for (GpxTrackSegment seg : trk.getSegments()) { … … 533 533 oldWp = null; 534 534 } 535 double now = new Date().getTime()/1000.0;535 double now = System.currentTimeMillis()/1000.0; 536 536 if (colored == colorModes.time) { 537 537 Date[] bounds = getMinMaxTimeForAllTracks(); -
trunk/src/org/openstreetmap/josm/io/CacheCustomContent.java
r5874 r6102 9 9 import java.io.IOException; 10 10 import java.io.UnsupportedEncodingException; 11 import java.util.Date;12 11 13 12 import org.openstreetmap.josm.Main; … … 87 86 */ 88 87 public byte[] updateIfRequired() throws T { 89 if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < new Date().getTime()/100088 if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < System.currentTimeMillis()/1000 90 89 || !isCacheValid()) 91 90 return updateForce(); … … 98 97 */ 99 98 public String updateIfRequiredString() throws T { 100 if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < new Date().getTime()/100099 if (Main.pref.getInteger("cache." + ident, 0) + updateInterval < System.currentTimeMillis()/1000 101 100 || !isCacheValid()) 102 101 return updateForceString(); … … 111 110 this.data = updateData(); 112 111 saveToDisk(); 113 Main.pref.putInteger("cache." + ident, (int)( new Date().getTime()/1000));112 Main.pref.putInteger("cache." + ident, (int)(System.currentTimeMillis()/1000)); 114 113 return data; 115 114 } -
trunk/src/org/openstreetmap/josm/io/CacheFiles.java
r6070 r6102 7 7 import java.math.BigInteger; 8 8 import java.security.MessageDigest; 9 import java.util.Date;10 9 import java.util.Iterator; 11 10 import java.util.Set; … … 110 109 // Update last mod time so we don't expire recently used data 111 110 if(updateModTime) { 112 data.setLastModified( new Date().getTime());111 data.setLastModified(System.currentTimeMillis()); 113 112 } 114 113 … … 162 161 // Update last mod time so we don't expire recently used images 163 162 if(updateModTime) { 164 img.setLastModified( new Date().getTime());163 img.setLastModified(System.currentTimeMillis()); 165 164 } 166 165 return ImageIO.read(img); … … 354 353 if(CacheFiles.EXPIRE_NEVER == this.expire) 355 354 return false; 356 return (file.lastModified() < ( new Date().getTime() - expire*1000));355 return (file.lastModified() < (System.currentTimeMillis() - expire*1000)); 357 356 } 358 357 } -
trunk/src/org/openstreetmap/josm/io/FileImporter.java
r6084 r6102 105 105 @Override 106 106 public int compareTo(FileImporter other) { 107 return (new Double(this.getPriority())).compareTo(other.getPriority());107 return Double.compare(this.getPriority(), other.getPriority()); 108 108 } 109 109
Note:
See TracChangeset
for help on using the changeset viewer.