Changeset 10475 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2016-06-24T08:36:12+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13045 - Inconsistent timezone handling in tests/nmea (patch by michael2402) - gsoc-core

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r10001 r10475  
    2020import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
    2121import org.openstreetmap.josm.data.gpx.WayPoint;
     22import org.openstreetmap.josm.tools.date.DateUtils;
    2223
    2324/**
     
    166167
    167168    public NmeaReader(InputStream source) throws IOException {
     169        rmcTimeFmt.setTimeZone(DateUtils.UTC);
     170        rmcTimeFmtStd.setTimeZone(DateUtils.UTC);
    168171
    169172        // create the data tree
  • trunk/src/org/openstreetmap/josm/tools/date/DateUtils.java

    r10212 r10475  
    3030public final class DateUtils {
    3131
     32    /**
     33     * The UTC time zone.
     34     */
     35    public static final TimeZone UTC = TimeZone.getTimeZone("UTC");
     36
    3237    protected DateUtils() {
    3338        // Hide default constructor for utils classes
     
    4651     * with the timezone lookup, is very expensive.
    4752     */
    48     private static final GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
     53    private static final GregorianCalendar calendar = new GregorianCalendar(UTC);
    4954    private static final GregorianCalendar calendarLocale = new GregorianCalendar(TimeZone.getDefault());
    5055    private static final DatatypeFactory XML_DATE;
Note: See TracChangeset for help on using the changeset viewer.