• 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: Dates (1-day resolution) redux
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dates (1-day resolution) redux


  • Subject: Re: Dates (1-day resolution) redux
  • From: Ramsey Lee Gurley <email@hidden>
  • Date: Wed, 11 Aug 2010 21:14:45 -0400


On Aug 11, 2010, at 8:20 PM, Paul Hoadley wrote:

> Hi Ramsey,
>
> On 12/08/2010, at 9:19 AM, Ramsey Lee Gurley wrote:
>
>> Perhaps this is a stupid question, but is there any reason a GregorianCalendar wouldn't work?  It seems it only needs a simple subclass providing factory methods for an EOAttribute prototype.
>
> GregorianCalendar has millisecond resolution and is timezone-aware, so I don't know that it's going to be an improvement on NSTimestamp.  Is it?
>
>
> --
> Paul.

http://developer.apple.com/legacy/mac/library/documentation/InternetWeb/Reference/WO542Reference/com/webobjects/foundation/NSTimestamp.html

If I'm wrong, I blame the Apple docs for misleading me (^_^)

I believe the difference is that yes, GregorianCalendar _is_ timezone aware.  NSTimestamp is not.  NSTimestamp's getTime() value is fixed when the timestamp is created.  If you then adjust your timezone frame of reference, the time does not adjust with you.  GregorianCalendar is the opposite.  It has fixed gregorian values (calendar day, month, year, etc) and the getTime() value fluctuates based on the timezone you set on it.

Ramsey

 _______________________________________________
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: Dates (1-day resolution) redux
      • From: Paul Hoadley <email@hidden>
References: 
 >Dates (1-day resolution) redux (From: Paul Hoadley <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Chuck Hill <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Jon Nolan <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: David Avendasora <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Mike Schrag <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Ramsey Lee Gurley <email@hidden>)
 >Re: Dates (1-day resolution) redux (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Re: Dates (1-day resolution) redux
  • Next by Date: Re: postNotification and editingContext().saveChanges() / editingContext().revert()
  • Previous by thread: Re: Dates (1-day resolution) redux
  • Next by thread: Re: Dates (1-day resolution) redux
  • Index(es):
    • Date
    • Thread