• 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: How to use an NSTimestampFormatter in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: How to use an NSTimestampFormatter in code
      • From: Dev WO <email@hidden>
References: 
 >How to use an NSTimestampFormatter in code (From: Dev WO <email@hidden>)
 >Re: How to use an NSTimestampFormatter in code (From: Hugi Thordarson <email@hidden>)
 >Re: How to use an NSTimestampFormatter in code (From: Dev WO <email@hidden>)
 >Re: How to use an NSTimestampFormatter in code (From: Dev WO <email@hidden>)

  • Prev by Date: Re: Implementing "google like" search
  • Next by Date: WOWorx Pierre Frisch Interview Posted...
  • Previous by thread: Re: How to use an NSTimestampFormatter in code
  • Next by thread: Re: How to use an NSTimestampFormatter in code
  • Index(es):
    • Date
    • Thread