Author: thebeing
Date: Tue Apr 28 17:18:47 2015
New Revision: 38463
URL: http://svn.gna.org/viewcvs/gnustep?rev=38463&view=rev
Log:
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).
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Source/NSDateFormatter.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=38463&r1=38462&r2=38463&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Tue Apr 28 17:18:47 2015
@@ -1,3 +1,8 @@
+2015-04-28 Niels Grewe <[email protected]>
+
+ * 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 <[email protected]>
* Source/NSThread.m: If an exception occurs while performing a
Modified: libs/base/trunk/Source/NSDateFormatter.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSDateFormatter.m?rev=38463&r1=38462&r2=38463&view=diff
==============================================================================
--- libs/base/trunk/Source/NSDateFormatter.m (original)
+++ libs/base/trunk/Source/NSDateFormatter.m Tue Apr 28 17:18:47 2015
@@ -986,7 +986,11 @@
&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;
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs