Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative to NSDate's dateWithNaturalLanguageString: ?



On 30 Jun 08, at 08:14, Jens Alfke wrote:
On 30 Jun '08, at 12:29 AM, David Arve wrote:

sqlite3_bind_int(sql_statement, 1, one_week);

Shouldn't that be sqlite3_bind_double? The variable one_week is declared as double, and I'm pretty sure that seconds-since-1970 intervals are soon going to overflow a (signed) 32-bit int, if they haven't already.

time_t (seconds since 1970, signed 32-bit integer) doesn't overflow until early 2038 - at which point there is mass panic, riots in the streets, and blood raining from the skies, because a ton of protocols have the 32-bit width baked into them.


But it's safe for the next 30 years or so. Hopefully we'll all be using 64-bit systems by then.
_______________________________________________


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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Alternative to NSDate's dateWithNaturalLanguageString: ? (From: "David Arve" <email@hidden>)
 >Re: Alternative to NSDate's dateWithNaturalLanguageString: ? (From: Jens Alfke <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.