Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
32-Bit Year 2038 Issue - Do We Care?
12-13-2018, 01:31 AM (This post was last modified: 12-13-2018 01:54 AM by VortecCPI.)
Post: #1
32-Bit Year 2038 Issue - Do We Care?
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

https://www.linkedin.com/in/eclipsepaulbecker
Visit this user's website Find all posts by this user
Quote this message in a reply
12-13-2018, 06:38 PM
Post: #2
RE: 32-Bit Year 2038 Issue - Do We Care?
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
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)