Digging under the covers: CFGregorianUnits gu = { 0, 0, numdays, 0, 0, 0 }; CFAbsoluteTime at = CFAbsoluteTimeAddGregorianUnits( 0, NULL, gu ); cd = [NSDate dateWithTimeIntervalSinceReferenceDate: at]; NSLog( @"date 4: %@", [cd description] );
Produces: "date 4: 2010-05-04 18:00:00 -0600", which is at least the right moment in time, even though it is not displayed correctly. While trying to use the time zone explicitly: CFGregorianUnits gu = { 0, 0, numdays, 0, 0, 0 }; CFAbsoluteTime at = CFAbsoluteTimeAddGregorianUnits( 0, CFTimeZoneCopySystem(), gu ); cd = [NSDate dateWithTimeIntervalSinceReferenceDate: at]; NSLog( @"date 4: %@", [cd description] ); Produces: "date 4: 2010-05-04 17:00:00 -0600", which is wronger ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com