views:

228

answers:

2

Im having a hard tim getting the NSDateFormatter to give me a correct date format. I need it to look like this:

Mon, 04 Jan 2010 10:10:00 GMT

But I am getting:

Mon, 04 Jan 2010 10:10:00 GMT+00:00

Using the format string:

EEE',' dd' 'MMM' 'yyyy HH':'mm':'ss z

No matter what value for timezone I use, the +00:00 appears to be stuck on the end. I realize I could just remove it form the resulting string, but that feels like cheating.

So how do I get the date formatter to not include a time offset value?

A: 

I had the same problem when generating Http Date in RC1123 format.

http://blog.mro.name/2009/08/nsdateformatter-http-header/

Has some good information, but basically just replaces z with the fixed string 'GMT'.

Andrew M.
Well that is sort of lame :(
Squeegy
A: 

After much more research, I'm pretty sure this can't be done. So my simple string manipulation will have to do.

Squeegy