OLD | NEW |
1 /* | 1 /* |
2 ******************************************************************************* | 2 ******************************************************************************* |
3 * Copyright (C) 1997-2015, International Business Machines Corporation and | 3 * Copyright (C) 1997-2015, International Business Machines Corporation and |
4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
5 ******************************************************************************* | 5 ******************************************************************************* |
6 * | 6 * |
7 * File TIMEZONE.CPP | 7 * File TIMEZONE.CPP |
8 * | 8 * |
9 * Modification History: | 9 * Modification History: |
10 * | 10 * |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // We access system timezone data through TPlatformUtilities, | 451 // We access system timezone data through TPlatformUtilities, |
452 // including tzset(), timezone, and tzname[]. | 452 // including tzset(), timezone, and tzname[]. |
453 int32_t rawOffset = 0; | 453 int32_t rawOffset = 0; |
454 const char *hostID; | 454 const char *hostID; |
455 | 455 |
456 // First, try to create a system timezone, based | 456 // First, try to create a system timezone, based |
457 // on the string ID in tzname[0]. | 457 // on the string ID in tzname[0]. |
458 | 458 |
459 uprv_tzset(); // Initialize tz... system data | 459 uprv_tzset(); // Initialize tz... system data |
460 | 460 |
| 461 uprv_tzname_clear_cache(); |
| 462 |
461 // Get the timezone ID from the host. This function should do | 463 // Get the timezone ID from the host. This function should do |
462 // any required host-specific remapping; e.g., on Windows this | 464 // any required host-specific remapping; e.g., on Windows this |
463 // function maps the Date and Time control panel setting to an | 465 // function maps the Date and Time control panel setting to an |
464 // ICU timezone ID. | 466 // ICU timezone ID. |
465 hostID = uprv_tzname(0); | 467 hostID = uprv_tzname(0); |
466 | 468 |
467 // Invert sign because UNIX semantics are backwards | 469 // Invert sign because UNIX semantics are backwards |
468 rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND; | 470 rawOffset = uprv_timezone() * -U_MILLIS_PER_SECOND; |
469 | 471 |
470 TimeZone* hostZone = NULL; | 472 TimeZone* hostZone = NULL; |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1687 ures_close(zones); | 1689 ures_close(zones); |
1688 return id; | 1690 return id; |
1689 } | 1691 } |
1690 | 1692 |
1691 | 1693 |
1692 U_NAMESPACE_END | 1694 U_NAMESPACE_END |
1693 | 1695 |
1694 #endif /* #if !UCONFIG_NO_FORMATTING */ | 1696 #endif /* #if !UCONFIG_NO_FORMATTING */ |
1695 | 1697 |
1696 //eof | 1698 //eof |
OLD | NEW |