• 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: Need localization-proof method of transporting dates.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need localization-proof method of transporting dates.


  • Subject: Re: Need localization-proof method of transporting dates.
  • From: Graham Cox <email@hidden>
  • Date: Wed, 8 Apr 2009 14:45:58 +1000


On 08/04/2009, at 2:31 PM, Michael Ash wrote:

I got curious and experimented. Archiving (as in NSCoder) appears to
work fine, but if you send an NSDate through an XML plist, it loses
its fractional seconds! (rdar://6768646) So if you're using plist
serialization, you may well not get the same date out that you put in.

However, since it sounds like you'll always get a whole number of
seconds (a multiple of 60, for that matter) then you should be fine.
Explicitly rounding on your side of things certainly wouldn't hurt
either.


I'm archiving using NSCoder to a binary archive, not to a XML plist. I'm now rounding off to a whole number of days also.

Thanks for all your help - just remains to be seen now if certain users can now open my app! ;)

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Need localization-proof method of transporting dates.
      • From: Graham Cox <email@hidden>
References: 
 >Need localization-proof method of transporting dates. (From: Graham Cox <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Christopher Kane <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Graham Cox <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Michael Ash <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Graham Cox <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: SQLite and Unicode
  • Next by Date: Re: finder file size
  • Previous by thread: Re: Need localization-proof method of transporting dates.
  • Next by thread: Re: Need localization-proof method of transporting dates.
  • Index(es):
    • Date
    • Thread