32bit vs 64bit - 32bit can't handle 2100 in strtotime?

John Reiser jreiser at bitwagon.com
Mon Jun 27 11:09:06 UTC 2011


> I would like to note that I am aware of that 32 bit systems will not
> work after 2038. But does that mean that they can not do simple date
> conversion?

Yes, if "simple date conversion" uses a 32-bit time_t and does not
check-and-correct for 32-bit wrap-around.

On a system which uses a 32-bit time_t, then some user code has problems
with the calculations for a 30-year mortgage with an origination date
of 2008 or later.  One common workaround is to use a temporary origin
of something like 1980-01-01T00:00 instead of 1969-01-01T00:00.
Using 1980 allows the same code to work for any _existing_ 30-year
mortgage as well as new ones.

-- 


More information about the devel mailing list