Fix a bug where the date format of the the formatter was reset when

you called -setTimeZone: -setLocale: or similar methods that require
recreating the UDateFormat (i.e. with ICU).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38463 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Niels Grewe 2015-04-28 15:18:47 +00:00
parent 422356c19f
commit 67ee1eaf7b
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-04-28 Niels Grewe <niels.grewe@halbordnung.de>
* Source/NSDateFormatter.m: Properly reinstall the user provided
date format when we need to recreate the icu-based date formatter.
2015-04-02 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSThread.m: If an exception occurs while performing a

View file

@ -986,7 +986,11 @@ static NSDateFormatterBehavior _defaultBehavior = 0;
&err);
if (U_FAILURE(err))
internal->_formatter = NULL;
if (nil != self->_dateFormat)
{
// Set the date format to the user provide one
[self setDateFormat: _dateFormat];
}
NSZoneFree ([self zone], tzID);
#else
return;