Re: NSDateFormatter refuses to format dates
Re: NSDateFormatter refuses to format dates
- Subject: Re: NSDateFormatter refuses to format dates
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Tue, 27 Sep 2011 21:53:17 +0700
On 27 Sep 2011, at 21:39, Fritz Anderson wrote:
> On 27 Sep 2011, at 3:41 AM, Gerriet M. Denkmann wrote:
>
>> [ dateFormatter setGeneratesCalendarDates: YES ];
> ...
>> NSLog(@" now \"%@\"", [dateFormatter stringFromDate: [NSDate date]]);
>
> NSCalendarDate is really most sincerely deprecated, and you're feeding the formatter an NSDate, not an NSCalendarDate. What happens if you set this to NO (or don't set it at all)?
The line "... setGeneratesCalendarDates..." has no effect at all. It was just a frantic attempt to get it to work. Has long since been commented out.
>
> In general, what happens if you temporarily remove the locale and time zone settings?
The time zone settings have been already removed, because setting the locale also sets the time zone.
I have just commented out the line "[ dateFormatter setLocale: locale ]" as you suggested, but the result is still an empty string.
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden