Re: How to use an NSTimestampFormatter in code
Re: How to use an NSTimestampFormatter in code
- Subject: Re: How to use an NSTimestampFormatter in code
- From: Lachlan Deck <email@hidden>
- Date: Sat, 29 Oct 2005 11:40:42 +1000
Hi there,
On 28/10/2005, at 6:16 PM, Dev WO wrote:
Just a short addition to this thread,
I'm trying to use this formatter (to get a valid date declaration
for an RSS (RDF) feed):
NSTimestampFormatter dateTimeFormatter = new NSTimestampFormatter
( "%Y-%m-%dT%H:%M%z", new DateFormatSymbols( Locale.ENGLISH ) );
But I get an exception because the %z
In fact the NSTimestamp is GMT, when I print it I get:
2005-10-25 08:28:05 Etc/GMT
Reading the documentation, it says it would default to the local
system timezone, but the null pointer exception make me think it
doesn't.
Can I set a default timezone for the application using:
setDefaultTimeZone in the application constructor? if it's the
correct way to handle that...
You might find my recently reposted article on this subject helpful:
http://keyvaluecoding.com/
An example project is linked...
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden