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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to