Changeset 10495 in josm for trunk


Ignore:
Timestamp:
2016-06-26T23:16:54+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13071 - Make DateUtilsTest.testTsFromString pass (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java

    r10483 r10495  
    3535    public static void setTimeZone(TimeZone zone) {
    3636        DateUtils.setTimeZone(zone);
     37        TimeZone.setDefault(zone);
    3738    }
    3839
     
    122123        assertEquals("12:00 AM", DateUtils.formatTime(new Date(5999), DateFormat.SHORT));
    123124
    124         TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
     125        setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
    125126        assertEquals("1:00:00 AM CET", DateUtils.formatTime(new Date(0), DateFormat.LONG));
    126127    }
     
    156157
    157158        // Local time
     159        TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
    158160        assertEquals(1459688400000L, DateUtils.tsFromString("03-APR-16 15:00:00"));
    159161    }
Note: See TracChangeset for help on using the changeset viewer.