| OLD | NEW |
| 1 /* | 1 /* |
| 2 ******************************************************************************* | 2 ******************************************************************************* |
| 3 * Copyright (C) 2007-2010, International Business Machines Corporation and * | 3 * Copyright (C) 2007-2010, International Business Machines Corporation and * |
| 4 * others. All Rights Reserved. * | 4 * others. All Rights Reserved. * |
| 5 ******************************************************************************* | 5 ******************************************************************************* |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "unicode/utypes.h" | 8 #include "unicode/utypes.h" |
| 9 | 9 |
| 10 #if !UCONFIG_NO_FORMATTING | 10 #if !UCONFIG_NO_FORMATTING |
| (...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 UBool useStandard = FALSE; | 1459 UBool useStandard = FALSE; |
| 1460 sav = cal.get(UCAL_DST_OFFSET, status); | 1460 sav = cal.get(UCAL_DST_OFFSET, status); |
| 1461 if (U_FAILURE(status)) { | 1461 if (U_FAILURE(status)) { |
| 1462 return result; | 1462 return result; |
| 1463 } | 1463 } |
| 1464 if (sav == 0) { | 1464 if (sav == 0) { |
| 1465 useStandard = TRUE; | 1465 useStandard = TRUE; |
| 1466 // Check if the zone actually uses daylight saving time around t
he time | 1466 // Check if the zone actually uses daylight saving time around t
he time |
| 1467 TimeZone *tmptz = tz.clone(); | 1467 TimeZone *tmptz = tz.clone(); |
| 1468 BasicTimeZone *btz = NULL; | 1468 BasicTimeZone *btz = NULL; |
| 1469 if (dynamic_cast<OlsonTimeZone *>(tmptz) != NULL | 1469 if (CR_DYNAMIC_CAST<OlsonTimeZone *>(tmptz) != NULL |
| 1470 || dynamic_cast<SimpleTimeZone *>(tmptz) != NULL | 1470 || CR_DYNAMIC_CAST<SimpleTimeZone *>(tmptz) != NULL |
| 1471 || dynamic_cast<RuleBasedTimeZone *>(tmptz) != NULL | 1471 || CR_DYNAMIC_CAST<RuleBasedTimeZone *>(tmptz) != NULL |
| 1472 || dynamic_cast<VTimeZone *>(tmptz) != NULL) { | 1472 || CR_DYNAMIC_CAST<VTimeZone *>(tmptz) != NULL) { |
| 1473 btz = (BasicTimeZone*)tmptz; | 1473 btz = (BasicTimeZone*)tmptz; |
| 1474 } | 1474 } |
| 1475 | 1475 |
| 1476 if (btz != NULL) { | 1476 if (btz != NULL) { |
| 1477 TimeZoneTransition before; | 1477 TimeZoneTransition before; |
| 1478 UBool beforTrs = btz->getPreviousTransition(time, TRUE, befo
re); | 1478 UBool beforTrs = btz->getPreviousTransition(time, TRUE, befo
re); |
| 1479 if (beforTrs | 1479 if (beforTrs |
| 1480 && (time - before.getTime() < kDstCheckRange) | 1480 && (time - before.getTime() < kDstCheckRange) |
| 1481 && before.getFrom()->getDSTSavings() != 0) { | 1481 && before.getFrom()->getDSTSavings() != 0) { |
| 1482 useStandard = FALSE; | 1482 useStandard = FALSE; |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2219 * The main purpose is to recover the storage used for the hash. | 2219 * The main purpose is to recover the storage used for the hash. |
| 2220 */ | 2220 */ |
| 2221 void ZSFStringPool::freeze() { | 2221 void ZSFStringPool::freeze() { |
| 2222 uhash_close(fHash); | 2222 uhash_close(fHash); |
| 2223 fHash = NULL; | 2223 fHash = NULL; |
| 2224 } | 2224 } |
| 2225 | 2225 |
| 2226 U_NAMESPACE_END | 2226 U_NAMESPACE_END |
| 2227 | 2227 |
| 2228 #endif /* #if !UCONFIG_NO_FORMATTING */ | 2228 #endif /* #if !UCONFIG_NO_FORMATTING */ |
| OLD | NEW |