webERP Forum

Full Version: 32-Bit Year 2038 Issue - Do We Care?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
BOMs.php

When adding a new BoM item...

The code below results in 12/31/1969:

PHP Code:
$_POST['EffectiveTo'] = Date($_SESSION['DefaultDateFormat'], Mktime(000Date('m'), Date('d'), (Date('y') + 20))); 

The code below results in 12/12/2037:

PHP Code:
$_POST['EffectiveTo'] = Date($_SESSION['DefaultDateFormat'], Mktime(000Date('m'), Date('d'), (Date('y') + 10))); 

Any ideas on this nonsense?
What the???

https://en.wikipedia.org/wiki/Year_2038_problem
More here: https://www.phpclasses.org/blog/package/...tamps.html
I think this issue has been resolved in PHP7.

$_POST['EffectiveTo'] = Date($_SESSION['DefaultDateFormat'], Mktime(0, 0, 0, Date('m'), Date('d'), (Date('y') + 20)));

shows 12/13/2038 on my PHP7 machine.

tim