Re: NSTimestampFormatter question
Re: NSTimestampFormatter question
- Subject: Re: NSTimestampFormatter question
- From: Chuck Hill <email@hidden>
- Date: Thu, 26 Mar 2009 13:23:44 -0700
On Mar 26, 2009, at 1:05 PM, Dom wrote:
I know that this is deprecated in WO5.4, but I have a source
timestamp string that looks like this: 2009-03-26 15:56:50-0400
and I'm trying to create a formatter with the following pattern: %Y-
%m-%d %H:%M:%S%z
and I'm getting an Illegal arguement exception: Invalid pattern
yyyy'-'MM'-'dd' 'HH':'mm':'sszzzz when I try parsing the input
string into an NSTimestamp.
Try removing bits to isolate what it does not like.
At first I tried just using the normal SimpleDateFormat class in
java, but apparently there's an issue with the "-" characters and so
I thought I'd revert to using NSTimestampFormatter to get past this
issue.
What is the issue with "-" characters? You should be able to escape
them, no?
Am I doing something wrong? OK, dumb question. What am I doing
wrong? ;-)
Not sure yet. I do recall that NSTimestampFormatter and time zone
parsing or formatting is somehow buggy.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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