PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

Bug #44209 strtotime doesn't support 64 bit timestamps
Submitted:22 Feb 2008 9:00am UTC Modified: 22 Feb 2008 10:20am UTC
From:bishillo at gmail dot com Assigned to:derick
Status:Closed Category:Date/time related
Version:5.2CVS-2008-02-22 (snap) OS:linux 64 bit
View/Vote Developer Edit Submission

[22 Feb 2008 9:00am UTC] bishillo at gmail dot com
Description:
------------
strtotime() of years >2038 or <1900 does not work on 64 bit platforms,
that should not have problems with those dates. The rest of php
functions work properly with those extended dates.

Reproduce code:
---------------
On 64 bit platforms php date functions support greater range of dates.
For exampe:

<?= date('d-m-Y',time()+31536000000) ?>
Returns:
3007-06-25

But strtotime does not work with those improved date ranges:

<?= date('Y-m-d',strtotime('3007-06-25')) ?>
Returns:
1970-01-01

I understand that output on 32 bit platforms, but on 64 bit should work
as the rest of functions, and return a valid 64bit timestamp for dates
>2038 or <1900.

[22 Feb 2008 9:23am UTC] derick@php.net
Weird, I was positive this was working.
[22 Feb 2008 9:49am UTC] derick@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.
[22 Feb 2008 10:20am UTC] bishillo at gmail dot com
Woa! fixed in 49 minutes! Thats fast. Thx!

RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC