use of java.util.SimpleTimeZone in project j2objc by google.
the class SimpleTimeZoneTest method testDstParis2014_SundayAfter25thMarch_SundayAfter25thOctober_UtcTime.
public void testDstParis2014_SundayAfter25thMarch_SundayAfter25thOctober_UtcTime() {
TimeZone timeZone = new SimpleTimeZone(PARIS_RAW_OFFSET, "Europe/Paris", Calendar.MARCH, 25, -Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, Calendar.OCTOBER, 25, -Calendar.SUNDAY, 3600000, SimpleTimeZone.UTC_TIME, 3600000);
checkDstParis2014(timeZone);
}
use of java.util.SimpleTimeZone in project j2objc by google.
the class SimpleTimeZoneTest method testDst_1stSundayApril_1stSundayOctober_DefaultTime.
public void testDst_1stSundayApril_1stSundayOctober_DefaultTime() {
TimeZone timeZone = new SimpleTimeZone(-18000000, "EST", Calendar.APRIL, 1, -Calendar.SUNDAY, 7200000, Calendar.OCTOBER, -1, Calendar.SUNDAY, 7200000, 3600000);
checkDstTransitionTimes(timeZone, 1998, "1998-04-05T07:00:00.000+0000", "1998-10-25T06:00:00.000+0000");
checkDstTransitionTimes(timeZone, 2014, "2014-04-06T07:00:00.000+0000", "2014-10-26T06:00:00.000+0000");
}
use of java.util.SimpleTimeZone in project j2objc by google.
the class SimpleTimeZoneTest method testDstNewYork2014_9thMarch_2ndNovember_UtcTime.
public void testDstNewYork2014_9thMarch_2ndNovember_UtcTime() {
TimeZone timeZone = new SimpleTimeZone(NEW_YORK_RAW_OFFSET, "EST", Calendar.MARCH, 9, 0, 25200000, SimpleTimeZone.UTC_TIME, Calendar.NOVEMBER, 2, 0, 21600000, SimpleTimeZone.UTC_TIME, 3600000);
checkDstNewYork2014(timeZone);
}
use of java.util.SimpleTimeZone in project j2objc by google.
the class TimeZoneTest method test_clone_SimpleTimeZone.
// http://code.google.com/p/android/issues/detail?id=11542
public void test_clone_SimpleTimeZone() {
SimpleTimeZone stz = new SimpleTimeZone(21600000, "Central Standard Time");
stz.setStartYear(1000);
stz.inDaylightTime(new Date());
stz.clone();
}
use of java.util.SimpleTimeZone in project j2objc by google.
the class TimeZoneTest method testCustomTimeZoneDisplayNames.
// http://b/3049014
public void testCustomTimeZoneDisplayNames() {
TimeZone tz0001 = new SimpleTimeZone(60000, "ONE MINUTE");
TimeZone tz0130 = new SimpleTimeZone(5400000, "ONE HOUR, THIRTY");
TimeZone tzMinus0130 = new SimpleTimeZone(-5400000, "NEG ONE HOUR, THIRTY");
assertEquals("GMT+00:01", tz0001.getDisplayName(false, TimeZone.SHORT, Locale.US));
assertEquals("GMT+01:30", tz0130.getDisplayName(false, TimeZone.SHORT, Locale.US));
assertEquals("GMT-01:30", tzMinus0130.getDisplayName(false, TimeZone.SHORT, Locale.US));
}
Aggregations