Simon Josefsson wrote:
> I suppose the longest
> possible strings we could see with 64-bit time_t would be this:
> 
> "Sun Sep 16 01:03:52 -292471206707\n\0"
> 
> Even a 64-bit unsigned year would fit in the same string:
> 
> 1970+2^64/60/60/24/365 =  584942419325
> 1970+2^63/60/60/24/365 =  292471210647
> 1970-2^64/60/60/24/365 = -584942415385
> 1970-2^63/60/60/24/365 = -292471206707
> 
> So CTIME_BUFSIZE should be 35?

With 50 years of computer science experience, we should have learned
the lesson to allocate more room than sounds necessary *now*. If
now you think 35 will be sufficient for all times, then we should
better choose twice that value: 70.
 
Bruno




Reply via email to