|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11371 strtotime() return -1 for year 1939-1969
Submitted: 2001-06-08 20:18 UTC Modified: 2001-06-13 14:17 UTC
From: satit at thaijoin dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.0.5 OS: win98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: satit at thaijoin dot com
New email:
PHP Version: OS:


 [2001-06-08 20:18 UTC] satit at thaijoin dot com
I use function strtotime() for count days and have return value -1 in year 1939 to 1969 on php 4 for windows and php 3.0.16 to and php 3.0.16 have error illegal operation in year 1938 and 2038. Php for linux have return value complete. Have any idea for function count days?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-09 01:59 UTC]
Please include a short example script into this report.

 [2001-06-09 18:29 UTC] satit at thaijoin dot com
This is my script for test function strtotime

for ($year=1900;$year <2010;$year++){
$fdate2= "20 jun ".$year;
echo "$year ,$date2<br>";

$day = date('d M Y');
echo "$day<br>";
$fdate1= strtotime("9 jun 1959");
$fdate2= strtotime($day);
$day = $fdate2-$fdate1;
$days= round($day/86400); 
echo "$fdate1<br>";
echo "$fdate2<br>";
echo "days = ".$days."<br>";
echo "years = ".round($days/365);
 [2001-06-13 14:17 UTC]
See this manual page for more info about UNIX timestamps:

this is not a bug in PHP but in Windows..


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 20:01:30 2024 UTC