• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTimestampFormatter question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSTimestampFormatter question
      • From: Dom <email@hidden>
References: 
 >NSTimestampFormatter question (From: Dom <email@hidden>)

  • Prev by Date: Re: newEO.localInstanceIn(localEditingContext)
  • Next by Date: Re: WO is dead!
  • Previous by thread: Re: NSTimestampFormatter question
  • Next by thread: Re: NSTimestampFormatter question
  • Index(es):
    • Date
    • Thread