old box - Ubuntu 6.06LTS (Dapper Drake) 64-bit new box - Gentoo Linux 64-bit ----- Gabriel Kuri | Sr. Network Engineer Instructional and Information Technology Division California State Polytechnic University, Pomona http://www.csupomona.edu/~iit | +1 909 979 6363 > -----Original Message----- > From: Nathan Rixham [mailto:nrixham@xxxxxxxxx] > Sent: Thursday, February 28, 2008 6:43 PM > To: php-general@xxxxxxxxxxxxx > Subject: Re: handling dates before 1901 > > Gabriel Kuri wrote: > > I recently migrated some php scripts from a box running php > 4.4.4 to php > > 5.2.5. due to the nature of the data, some of the php > scripts require > > handling dates before 1901. both boxes are 64-bit (original > and new), > > however the new box isn't handling dates properly before 1901 with > > either the mktime() or strtotime() functions. it was > working perfectly > > on the old box and I'm stumped as to why it stopped working > on the new > > one. did the mktime() and strtotime() functions in php 5 regress to > > handling the dates as 32-bit ints? > > > > here's an example of some php code to test between the two boxes: > > > > <?php > > > > echo "12-13-1901: ".mktime(0,0,0, 12, 13, 1901)."\n"; > > echo "12-14-1901: ".mktime(0,0,0, 12, 14, 1901)."\n"; > > > > echo "1-18-2038: ".mktime(0,0,0, 1, 18, 2038)."\n"; > > echo "1-19-2038: ".mktime(0,0,0, 1, 19, 2038)."\n"; > > > > echo "12-13-1901: ".strtotime("12/13/1901")."\n"; > > echo "12-14-1901: ".strtotime("12/14/1901")."\n"; > > > > ?> > > > > > > output of code on old box: > > > > 12-13-1901: -2147529600 > > 12-14-1901: -2147443200 > > 1-18-2038: 2147414400 > > 1-19-2038: 2147500800 > > 12-13-1901: -2147529600 > > 12-14-1901: -2147443200 > > > > output of code on new box: > > > > 12-13-1901: > > 12-14-1901: -2147443200 > > 1-18-2038: 2147414400 > > 1-19-2038: > > 12-13-1901: > > 12-14-1901: -2147443200 > > > > thanks much ... > > > > > > ----- > > Gabriel Kuri | Sr. Network Engineer > > Instructional and Information Technology Division > > California State Polytechnic University, Pomona > > http://www.csupomona.edu/~iit | +1 909 979 6363 > > same os on both boxes? + which versions > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php