Lines Matching refs:tz

240 TimeZoneTest::findTransition(const TimeZone& tz,  in findTransition()  argument
244 UBool startsInDST = tz.inDaylightTime(min, ec); in findTransition()
246 if (tz.inDaylightTime(max, ec) == startsInDST) { in findTransition()
247 …logln("Error: " + tz.getID(id) + ".inDaylightTime(" + dateToString(min) + ") = " + (startsInDST?"T… in findTransition()
254 if (tz.inDaylightTime(mid, ec) == startsInDST) { in findTransition()
263 logln(tz.getID(id) + " Before: " + min/1000 + " = " + in findTransition()
264 dateToString(min,s,tz)); in findTransition()
265 logln(tz.getID(id) + " After: " + max/1000 + " = " + in findTransition()
266 dateToString(max,s,tz)); in findTransition()
270 TimeZoneTest::testUsingBinarySearch(const TimeZone& tz, in testUsingBinarySearch() argument
275 UBool startsInDST = tz.inDaylightTime(min, status); in testUsingBinarySearch()
277 if (tz.inDaylightTime(max, status) == startsInDST) { in testUsingBinarySearch()
284 if (tz.inDaylightTime(mid, status) == startsInDST) { in testUsingBinarySearch()
316 TimeZone* tz = TimeZone::createTimeZone("PRT"); in TestPRTOffset() local
317 if (tz == 0) { in TestPRTOffset()
323 double foundOffset = tz->getRawOffset(); in TestPRTOffset()
331 delete tz; in TestPRTOffset()
506 TimeZone *tz = TimeZone::createTimeZone("PST"); in TestGetAvailableIDs913() local
507 if (tz != 0) logln("getTimeZone(PST) = " + tz->getID(str)); in TestGetAvailableIDs913()
509 delete tz; in TestGetAvailableIDs913()
510 tz = TimeZone::createTimeZone("America/Los_Angeles"); in TestGetAvailableIDs913()
511 if (tz != 0) logln("getTimeZone(America/Los_Angeles) = " + tz->getID(str)); in TestGetAvailableIDs913()
513 delete tz; in TestGetAvailableIDs913()
516 tz = TimeZone::createTimeZone("NON_EXISTENT"); in TestGetAvailableIDs913()
518 if (tz == 0) in TestGetAvailableIDs913()
520 else if (tz->getID(temp) != UCAL_UNKNOWN_ZONE_ID) in TestGetAvailableIDs913()
522 delete tz; in TestGetAvailableIDs913()
700 TimeZone *tz = TimeZone::createTimeZone(*id1); in TestGetAvailableIDsNew() local
701 if (tz->getRawOffset() != (-5)*60*60*1000) { in TestGetAvailableIDsNew()
704 delete tz; in TestGetAvailableIDsNew()
908 TimeZone *tz = TimeZone::createTimeZone(itsID); in TestShortZoneIDs() local
909 if (!tz || (kReferenceList[i].offset != 0 && *tz == *TimeZone::getGMT())) { in TestShortZoneIDs()
915 UBool usesDaylight = tz->useDaylightTime(); in TestShortZoneIDs()
932 int32_t offsetInMinutes = tz->getRawOffset()/60000; in TestShortZoneIDs()
950 delete tz; in TestShortZoneIDs()
1575 SimpleTimeZone *tz = new SimpleTimeZone(-5 * U_MILLIS_PER_HOUR, "dstSavingsTest", in TestDSTSavings() local
1581 if (tz->getRawOffset() != -5 * U_MILLIS_PER_HOUR) in TestDSTSavings()
1582 … errln(UnicodeString("Got back a raw offset of ") + (tz->getRawOffset() / U_MILLIS_PER_HOUR) + in TestDSTSavings()
1584 if (!tz->useDaylightTime()) in TestDSTSavings()
1586 if (tz->getDSTSavings() != 0.5 * U_MILLIS_PER_HOUR) in TestDSTSavings()
1587 errln(UnicodeString("Set DST offset to 0.5 hour, but got back ") + (tz->getDSTSavings() / in TestDSTSavings()
1590 int32_t offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JANUARY, 1, in TestDSTSavings()
1596 offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JUNE, 1, UCAL_MONDAY, in TestDSTSavings()
1602 tz->setDSTSavings(U_MILLIS_PER_HOUR, status); in TestDSTSavings()
1603 offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JANUARY, 1, in TestDSTSavings()
1609 offset = tz->getOffset(GregorianCalendar::AD, 1998, UCAL_JUNE, 1, UCAL_MONDAY, in TestDSTSavings()
1615 delete tz; in TestDSTSavings()
1628 SimpleTimeZone tz(-5 * U_MILLIS_PER_HOUR, "alternateRuleTest"); in TestAlternateRules() local
1632 tz.setStartRule(UCAL_MARCH, 10, 12 * U_MILLIS_PER_HOUR, status); in TestAlternateRules()
1635 tz.setEndRule(UCAL_OCTOBER, 20, 12 * U_MILLIS_PER_HOUR, status); in TestAlternateRules()
1639 int32_t offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 5, in TestAlternateRules()
1645 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 15, in TestAlternateRules()
1651 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 15, in TestAlternateRules()
1656 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 25, in TestAlternateRules()
1663 tz.setStartRule(UCAL_MARCH, 10, UCAL_FRIDAY, 12 * millisPerHour, TRUE, status); in TestAlternateRules()
1666 tz.setEndRule(UCAL_OCTOBER, 20, UCAL_FRIDAY, 12 * millisPerHour, FALSE, status); in TestAlternateRules()
1670 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 11, in TestAlternateRules()
1676 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_MARCH, 14, in TestAlternateRules()
1682 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 15, in TestAlternateRules()
1688 offset = tz.getOffset(GregorianCalendar::AD, 1998, UCAL_OCTOBER, 17, in TestAlternateRules()
1818 TimeZone *tz = TimeZone::createTimeZone(id); in TestHistorical() local
1820 if (tz == 0) { in TestHistorical()
1822 } else if (tz->getID(s) != UnicodeString(id)) { in TestHistorical()
1828 tz->getOffset(when, FALSE, raw, dst, ec); in TestHistorical()
1843 delete tz; in TestHistorical()
1939 TimeZone *tz; in TestFebruary() local
1943 tz = timezones[t]; in TestFebruary()
1956 tz->getOffset(dt, FALSE, raw, dst, status); in TestFebruary()