Page 1 of 1
time()
Posted: Tue Jun 14, 2005 2:10 pm
by psychotomus
whats the longest length time() can return?
Posted: Tue Jun 14, 2005 2:15 pm
by Skara
on 32 bit processors, time() should stop in a few years, if I'm not mistaken. But by the time we get around to then, we'll all be 64 bit anyway.

Posted: Tue Jun 14, 2005 2:15 pm
by hawleyjr
Depends on how far in time you think your application will be around.
Y2K :)
Posted: Tue Jun 14, 2005 4:39 pm
by psychotomus
well this doesnt help me much.
I need to create a Field in sql table based upon the time length. What length would you say would be safe to use? 10? 15? 20? without making it like 100 which would make it safe ^_^
Posted: Tue Jun 14, 2005 5:49 pm
by pickle
10 is the maximum length of the values that the date() function can currently generate. (9999999999 = Monday, January 18th, 2038 - 8:14 pm). I usually use length 11 because I figure that should last long enough.
Posted: Wed Jun 15, 2005 12:41 am
by Syranide
if you store in a database, then by all means, don't save it as a string, because what is it you are going to store? time? integers, what size? 32bits... which leaves us with "int" as the datatype, unsigned. if you want to be thinking ahead then you are to use bigint (64bits I think).