Changeset 7049 in josm
- Timestamp:
- 2014-05-02T02:54:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r7029 r7049 257 257 } 258 258 259 private static final DateFormat timeFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");260 static {261 TimeZone tz = TimeZone.getTimeZone("UTC");262 timeFormatter.setTimeZone(tz);263 }264 265 259 public static final String MARKER_OFFSET = "waypointOffset"; 266 260 public static final String MARKER_FORMATTED_OFFSET = "formattedWaypointOffset"; … … 270 264 public static final String LABEL_PATTERN_DESC = "{desc}"; 271 265 266 private final DateFormat timeFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); 272 267 private final TemplateEngineDataProvider dataProvider; 273 268 private final String text; … … 288 283 289 284 public Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String iconName, MarkerLayer parentLayer, double time, double offset) { 285 this(ll, dataProvider, null, iconName, parentLayer, time, offset); 286 } 287 288 public Marker(LatLon ll, String text, String iconName, MarkerLayer parentLayer, double time, double offset) { 289 this(ll, null, text, iconName, parentLayer, time, offset); 290 } 291 292 private Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String text, String iconName, MarkerLayer parentLayer, double time, double offset) { 293 timeFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); 290 294 setCoor(ll); 291 295 … … 296 300 297 301 this.dataProvider = dataProvider; 298 this.text = null;299 }300 301 public Marker(LatLon ll, String text, String iconName, MarkerLayer parentLayer, double time, double offset) {302 setCoor(ll);303 304 this.offset = offset;305 this.time = time;306 this.symbol = iconName != null ? ImageProvider.getIfAvailable("markers",iconName) : null;307 this.parentLayer = parentLayer;308 309 this.dataProvider = null;310 302 this.text = text; 311 303 } -
trunk/src/org/openstreetmap/josm/io/NmeaReader.java
r7037 r7049 21 21 22 22 /** 23 * Read a nmeafile. Based on information from24 * http://www.kowoma.de/gps/zusatzerklaerungen/NMEA.htm23 * Reads a NMEA file. Based on information from 24 * <a href="http://www.kowoma.de/gps/zusatzerklaerungen/NMEA.htm">http://www.kowoma.de</a> 25 25 * 26 26 * @author cbrill … … 132 132 public GpxData data; 133 133 134 // private static final SimpleDateFormat GGATIMEFMT = 135 // new SimpleDateFormat("HHmmss.SSS"); 136 private static final SimpleDateFormat RMCTIMEFMT = 137 new SimpleDateFormat("ddMMyyHHmmss.SSS"); 138 private static final SimpleDateFormat RMCTIMEFMTSTD = 139 new SimpleDateFormat("ddMMyyHHmmss"); 134 private final SimpleDateFormat rmcTimeFmt = new SimpleDateFormat("ddMMyyHHmmss.SSS"); 135 private final SimpleDateFormat rmcTimeFmtStd = new SimpleDateFormat("ddMMyyHHmmss"); 140 136 141 137 private Date readTime(String p) { 142 Date d = RMCTIMEFMT.parse(p, new ParsePosition(0));138 Date d = rmcTimeFmt.parse(p, new ParsePosition(0)); 143 139 if (d == null) { 144 d = RMCTIMEFMTSTD.parse(p, new ParsePosition(0));140 d = rmcTimeFmtStd.parse(p, new ParsePosition(0)); 145 141 } 146 142 if (d == null)
Note:
See TracChangeset
for help on using the changeset viewer.