Code example for TimeZone

Methods: setDefault

0
    } 
 
    @After 
    public void tearDown() throws Exception 
    { 
        TimeZone.setDefault(defaultTimeZone);
    } 
 
    @Test 
    public void testGetStartTimeAsDate() 
    { 
        final Date result = DateUtil.parseDateTime(dateString);
        assertEquals(1148039688000L, result.getTime());
        assertEquals("Fri May 19 11:54:48 GMT 2006", result.toString());
    } 
 
    @Test 
    public void testGetStartTimeAsDateWithTimeZone() 
    { 
        final TimeZone tz = TimeZone.getTimeZone("GMT+2");
Connect your IDE to all the code out there  Get Codota for Java