• 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: Date-Only NSTimestamps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date-Only NSTimestamps


  • Subject: Re: Date-Only NSTimestamps
  • From: Simon McLean <email@hidden>
  • Date: Wed, 2 Jan 2008 21:51:46 +0000

It should be possible to normalize it at 12:00 GMT instead of the default time zone.  I need to try that out.


IIRC all timestamps are stored at GMT. So if you do this on an object:

setCreateTimeStamp(new NSTimestamp());

at 01 Jan 08 00:01 on a server that is at BST then it get's stored as 31 Dec 08 23:01 GMT

So if you then query using a qualifier to find things created after 01 Jan 08 00:00 at GMT, you miss this object.

Working at GMT is definitely one way of easing the pain, but i think everything has to be at GMT for it to work - which i guess is most easily accomplished by setting the default time time zone to GMT. But then you get a whole new world of pain because you have to convert timestamps on the fly for presenting to your users!

I work in the travel industry and hence date/time stuff is pretty interesting (eg flights taking off in one time zone and landing 2 days later in another timezone, or presenting a hotel cancellation policy stored in one timezone to a user in another timezone so they know when they need to cancel it by locally). The big airline systems typically simplify the use of date and time by a) storing them separately, b) storing everything as string, and c) storing everything in the "local time zone". You then of course have problems sorting things so it's not a cure for all time stamp issues, but it can make queries a lot more predictable.

Simon

 _______________________________________________
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: Date-Only NSTimestamps
      • From: Chuck Hill <email@hidden>
    • Re: Date-Only NSTimestamps
      • From: Andrew Lindesay <email@hidden>
References: 
 >Date-Only NSTimestamps (From: David Avendasora <email@hidden>)
 >Re: Date-Only NSTimestamps (From: Chuck Hill <email@hidden>)
 >Re: Date-Only NSTimestamps (From: Simon McLean <email@hidden>)
 >Re: Date-Only NSTimestamps (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Date-Only NSTimestamps
  • Next by Date: Re: Date-Only NSTimestamps
  • Previous by thread: Re: Date-Only NSTimestamps
  • Next by thread: Re: Date-Only NSTimestamps
  • Index(es):
    • Date
    • Thread