Changeset 1499 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2009-03-18T16:13:41+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r1494 r1499 33 33 import org.openstreetmap.josm.data.osm.visitor.Visitor; 34 34 import org.openstreetmap.josm.gui.PleaseWaitDialog; 35 import org.openstreetmap.josm.tools.DateUtils; 35 36 import org.xml.sax.Attributes; 36 37 import org.xml.sax.InputSource; … … 101 102 osm.selected = selected; 102 103 osm.deleted = deleted; 103 osm. timestamp = timestamp;104 osm.setTimestamp(getTimestamp()); 104 105 osm.user = user; 105 106 osm.visible = visible; 106 107 osm.version = version; 107 osm.checkTagged();108 osm.checkDirectionTagged();109 108 osm.mappaintStyle = null; 110 109 } … … 304 303 String time = atts.getValue("timestamp"); 305 304 if (time != null && time.length() != 0) { 306 /* Do not parse the date here since it wastes a HUGE amount of time. 307 * Moved into OsmPrimitive. 308 try { 309 current.timestamp = DateParser.parse(time); 310 } catch (ParseException e) { 311 e.printStackTrace(); 312 throw new SAXException(tr("Couldn''t read time format \"{0}\".",time)); 313 } 314 */ 315 current.timestamp = time; 305 current.setTimestamp(DateUtils.fromString(time)); 316 306 } 317 307 -
trunk/src/org/openstreetmap/josm/io/OsmWriter.java
r1225 r1499 16 16 import org.openstreetmap.josm.data.osm.Way; 17 17 import org.openstreetmap.josm.data.osm.visitor.Visitor; 18 import org.openstreetmap.josm.tools.DateUtils; 18 19 19 20 /** … … 201 202 out.print(" action='"+action+"'"); 202 203 } 203 if ( osm.timestamp != null) {204 out.print(" timestamp='"+ osm.timestamp+"'");204 if (!osm.isTimestampEmpty()) { 205 out.print(" timestamp='"+DateUtils.fromDate(osm.getTimestamp())+"'"); 205 206 } 206 207 // user and visible added with 0.4 API
Note:
See TracChangeset
for help on using the changeset viewer.