Changeset 18219 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2021-09-12T14:51:15+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r18211 r18219 61 61 private GpxData data; 62 62 private String indent = ""; 63 private Instant metaTime; 63 64 private List<String> validprefixes; 64 65 … … 66 67 private static final int ROUTE_POINT = 1; 67 68 private static final int TRACK_POINT = 2; 69 70 /** 71 * Returns the forced metadata time information, if any. 72 * @return the forced metadata time information, or {@code null} 73 * @since 18219 74 */ 75 public Instant getMetaTime() { 76 return metaTime; 77 } 78 79 /** 80 * Sets the forced metadata time information. 81 * @param metaTime the forced metadata time information, or {@code null} to use the current time 82 * @since 18219 83 */ 84 public void setMetaTime(Instant metaTime) { 85 this.metaTime = metaTime; 86 } 68 87 69 88 /** … … 105 124 }); 106 125 } 126 data.put(META_TIME, (metaTime != null ? metaTime : Instant.now()).toString()); 107 127 data.endUpdate(); 108 128 … … 235 255 } 236 256 237 simpleTag("time", Instant.now().toString()); 257 // write the time 258 if (attr.containsKey(META_TIME)) { 259 simpleTag("time", data.getString(META_TIME)); 260 } 238 261 239 262 Bounds bounds = data.recalculateBounds();
Note:
See TracChangeset
for help on using the changeset viewer.