Re: Inconsistencies with NSDate timeIntervalSinceReferenceDate
Re: Inconsistencies with NSDate timeIntervalSinceReferenceDate
- Subject: Re: Inconsistencies with NSDate timeIntervalSinceReferenceDate
- From: "stephen joseph butler" <email@hidden>
- Date: Wed, 21 Nov 2007 19:08:07 -0600
On Nov 21, 2007 7:01 PM, Dallas Brown <email@hidden> wrote:
> I seem to be getting some major inconsistencies when using NSDate
> timeIntervalSinceReferenceDate....
> Let me explain...
>
> I have the following code:
>
> NSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];
> NSLog(@"%@", [NSDate dateWithTimeIntervalSinceReferenceDate: now]);
> NSLog(@"%@", [NSString stringWithFormat:@"%d", now]);
NSTimeinterval is a double, not an integer. Try @"%f".
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden