• 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: Sat, 4 Apr 2009 23:29:14 +1100


On 04/04/2009, at 11:17 PM, Ken Thomases wrote:

Unless I've missed something, you left out an important part. How are you storing/serializing the date information and later "recovering" it?


Ah, good point ;-)

The date is added to a dictionary. The dictionary is then archived. Decoding is simply dearchiving. The SHA-1 hash is stored in the same dictionary as NSData. On decoding I can recover all the objects OK as far as my own testing can establish - unfortunately getting a debug trace on the tester's machine is not really possible, so exactly where it's failing I can't be sure.

The reason I suspect the localisation is that an earlier version definitely broke with system locale because I was using the - description method of the date to compute the hash, not the -hash method, and -description was being formatted according to the system locale.

--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: Andy Lee <email@hidden>
References: 
 >Need localization-proof method of transporting dates. (From: Graham Cox <email@hidden>)
 >Re: Need localization-proof method of transporting dates. (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Need localization-proof method of transporting dates.
  • Next by Date: Re: Need localization-proof method of transporting dates.
  • 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