Changeset 15250 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/rtklib/RtkLibPosReader.java
r15247 r15250 22 22 import org.openstreetmap.josm.io.IGpxReader; 23 23 import org.openstreetmap.josm.tools.Logging; 24 import org.openstreetmap.josm.tools.date.DateUtils; 24 25 import org.xml.sax.SAXException; 25 26 … … 61 62 public RtkLibPosReader(InputStream source) throws IOException { 62 63 this.source = Objects.requireNonNull(source); 64 dateTimeFmt.setTimeZone(DateUtils.UTC); 63 65 } 64 66 -
trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java
r15045 r15250 36 36 * The UTC time zone. 37 37 */ 38 public static final TimeZone UTC = TimeZone.getTimeZone( "UTC");38 public static final TimeZone UTC = TimeZone.getTimeZone(ZoneOffset.UTC); 39 39 40 40 /** -
trunk/test/unit/org/openstreetmap/josm/io/rtklib/RtkLibPosReaderTest.java
r15247 r15250 55 55 56 56 List<WayPoint> wayPoints = new ArrayList<>(in.getGpxData().tracks.iterator().next().getSegments().iterator().next().getWayPoints()); 57 assertEquals(DateUtils.fromString("2019-06-08T0 6:23:12.000Z"), wayPoints.get(0).get(GpxConstants.PT_TIME));58 assertEquals(DateUtils.fromString("2019-06-08T0 6:23:12.300Z"), wayPoints.get(1).get(GpxConstants.PT_TIME));59 assertEquals(DateUtils.fromString("2019-06-08T0 6:23:12.600Z"), wayPoints.get(2).get(GpxConstants.PT_TIME));57 assertEquals(DateUtils.fromString("2019-06-08T08:23:12.000Z"), wayPoints.get(0).get(GpxConstants.PT_TIME)); 58 assertEquals(DateUtils.fromString("2019-06-08T08:23:12.300Z"), wayPoints.get(1).get(GpxConstants.PT_TIME)); 59 assertEquals(DateUtils.fromString("2019-06-08T08:23:12.600Z"), wayPoints.get(2).get(GpxConstants.PT_TIME)); 60 60 assertEquals(wayPoints.get(0).getDate(), wayPoints.get(0).get(GpxConstants.PT_TIME)); 61 61 62 assertEquals("2019-06-08T0 6:23:12.000Z", iso8601.format(wayPoints.get(0).getDate()));63 assertEquals("2019-06-08T0 6:23:12.300Z", iso8601.format(wayPoints.get(1).getDate()));64 assertEquals("2019-06-08T0 6:23:12.600Z", iso8601.format(wayPoints.get(2).getDate()));62 assertEquals("2019-06-08T08:23:12.000Z", iso8601.format(wayPoints.get(0).getDate())); 63 assertEquals("2019-06-08T08:23:12.300Z", iso8601.format(wayPoints.get(1).getDate())); 64 assertEquals("2019-06-08T08:23:12.600Z", iso8601.format(wayPoints.get(2).getDate())); 65 65 66 66 assertEquals(new LatLon(46.948881673, -1.484757046), wayPoints.get(0).getCoor());
Note:
See TracChangeset
for help on using the changeset viewer.