Changeset 14079 in josm for trunk


Ignore:
Timestamp:
2018-08-03T18:18:43+02:00 (10 months ago)
Author:
Don-vip
Message:

see #16550 - use UTC by default for GPX timestamps

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java

    r14055 r14079  
    1818import java.util.List;
    1919import java.util.Map;
    20 import java.util.TimeZone;
    2120
    2221import javax.swing.ImageIcon;
     
    238237    private Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String text, String iconName, MarkerLayer parentLayer,
    239238            double time, double offset) {
    240         timeFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
    241239        setCoor(ll);
    242240
  • trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java

    r14055 r14079  
    263263     */
    264264    public static DateFormat getGpxFormat() {
    265         return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
     265        SimpleDateFormat result = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
     266        result.setTimeZone(UTC);
     267        return result;
    266268    }
    267269
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r13812 r14079  
    2929import org.openstreetmap.josm.tools.JosmRuntimeException;
    3030import org.openstreetmap.josm.tools.Logging;
     31import org.openstreetmap.josm.tools.date.DateUtils;
    3132
    3233/**
     
    9798        }
    9899        System.setProperty("josm.home", josmHome);
    99         TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
     100        TimeZone.setDefault(DateUtils.UTC);
    100101        Config.setPreferencesInstance(Main.pref);
    101102        Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance());
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java

    r13306 r14079  
    88import java.util.Arrays;
    99import java.util.Collections;
    10 import java.util.TimeZone;
    1110
    1211import org.junit.BeforeClass;
     
    4039    @BeforeClass
    4140    public static void setUp() {
    42         DateUtilsTest.setTimeZone(TimeZone.getTimeZone("UTC"));
     41        DateUtilsTest.setTimeZone(DateUtils.UTC);
    4342    }
    4443
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/OffsetTest.java

    r11914 r14079  
    55
    66import java.text.ParseException;
    7 import java.util.TimeZone;
    87
    98import org.junit.BeforeClass;
     
    1110import org.junit.Test;
    1211import org.openstreetmap.josm.testutils.JOSMTestRules;
     12import org.openstreetmap.josm.tools.date.DateUtils;
    1313import org.openstreetmap.josm.tools.date.DateUtilsTest;
    1414
     
    3232    @BeforeClass
    3333    public static void setUp() {
    34         DateUtilsTest.setTimeZone(TimeZone.getTimeZone("UTC"));
     34        DateUtilsTest.setTimeZone(DateUtils.UTC);
    3535    }
    3636
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/TimezoneTest.java

    r11914 r14079  
    55
    66import java.text.ParseException;
    7 import java.util.TimeZone;
    87
    98import org.junit.BeforeClass;
     
    1110import org.junit.Test;
    1211import org.openstreetmap.josm.testutils.JOSMTestRules;
     12import org.openstreetmap.josm.tools.date.DateUtils;
    1313import org.openstreetmap.josm.tools.date.DateUtilsTest;
    1414
     
    3232    @BeforeClass
    3333    public static void setUp() {
    34         DateUtilsTest.setTimeZone(TimeZone.getTimeZone("UTC"));
     34        DateUtilsTest.setTimeZone(DateUtils.UTC);
    3535    }
    3636
  • trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java

    r14068 r14079  
    5151    @Before
    5252    public void setUp() {
    53         iso8601.setTimeZone(TimeZone.getTimeZone("UTC"));
     53        iso8601.setTimeZone(DateUtils.UTC);
    5454    }
    5555
Note: See TracChangeset for help on using the changeset viewer.