Changeset 13903 in josm
- Timestamp:
- 2018-06-09T00:36:19+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/NoteWriter.java
r8380 r13903 7 7 import java.io.PrintWriter; 8 8 import java.nio.charset.StandardCharsets; 9 import java.text.DateFormat;10 9 10 import org.openstreetmap.josm.data.coor.LatLon; 11 11 import org.openstreetmap.josm.data.notes.Note; 12 12 import org.openstreetmap.josm.data.notes.NoteComment; … … 20 20 * attribute in the comment element to indicate if the comment is a new local 21 21 * comment that has not been uploaded to the OSM server yet. 22 * @since 7732 22 23 */ 23 24 public class NoteWriter extends XmlWriter { 24 25 private final DateFormat iso8601Format = DateUtils.newIsoDateTimeFormat();26 25 27 26 /** … … 49 48 out.println("<osm-notes>"); 50 49 for (Note note : data.getNotes()) { 50 LatLon ll = note.getLatLon(); 51 51 out.print(" <note "); 52 52 out.print("id=\"" + note.getId() + "\" "); 53 out.print("lat=\"" + note.getLatLon().lat() + "\" ");54 out.print("lon=\"" + note.getLatLon().lon() + "\" ");55 out.print("created_at=\"" + iso8601Format.format(note.getCreatedAt()) + "\" ");53 out.print("lat=\"" + LatLon.cDdHighPecisionFormatter.format(ll.lat()) + "\" "); 54 out.print("lon=\"" + LatLon.cDdHighPecisionFormatter.format(ll.lon()) + "\" "); 55 out.print("created_at=\"" + DateUtils.fromDate(note.getCreatedAt()) + "\" "); 56 56 if (note.getClosedAt() != null) { 57 out.print("closed_at=\"" + iso8601Format.format(note.getClosedAt()) + "\" ");57 out.print("closed_at=\"" + DateUtils.fromDate(note.getClosedAt()) + "\" "); 58 58 } 59 59 … … 72 72 out.print(" <comment"); 73 73 out.print(" action=\"" + comment.getNoteAction() + "\" "); 74 out.print("timestamp=\"" + iso8601Format.format(comment.getCommentTimestamp()) + "\" ");74 out.print("timestamp=\"" + DateUtils.fromDate(comment.getCommentTimestamp()) + "\" "); 75 75 if (comment.getUser() != null && !comment.getUser().equals(User.getAnonymous())) { 76 76 out.print("uid=\"" + comment.getUser().getId() + "\" ");
Note:
See TracChangeset
for help on using the changeset viewer.