mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-11139 A quick fix in the new DateFormat factory logic to use the current default time zone in a new instance.
X-SVN-Rev: 36759
This commit is contained in:
parent
738cee69cc
commit
82bd8a35f4
1 changed files with 7 additions and 0 deletions
|
@ -208,6 +208,13 @@ static DateFormat *createFromCache(
|
|||
ptr->removeRef();
|
||||
if (result == NULL) {
|
||||
status = U_MEMORY_ALLOCATION_ERROR;
|
||||
} else {
|
||||
// Set the currently active default TimeZone,
|
||||
// because the cached instance might be created
|
||||
// with another TimeZone.
|
||||
// Note: We could do some optimization in SharedDateFormat
|
||||
// to pick up the current default without cloning old default.
|
||||
result->adoptTimeZone(TimeZone::createDefault());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue