Re: Need localization-proof method of transporting dates.
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