[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSCalendarDate bug?



Le 1/03/02 15:42, Mike Vannorsdel disait :

> Oops, make that 31 years later (hit the wrong key).

You're counting from Jan 1, 1970 (Unix time).
NSDate however counts from Jan 1, 2001 :

See NSDate.html
Seconds since absolute reference date (1 January, 2001, GMT)

If you want Unix time use the constant NSTimeIntervalSince1970 (see
NSDate.html too)

-- 
Thomas Deniau