|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23748 mktime function return -1 if year<=1970 or year>=2039
Submitted: 2003-05-22 03:12 UTC Modified: 2003-05-22 05:56 UTC
From: jcarlos at info-ab dot uclm dot es Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.1 OS: Win32
Private report: No CVE-ID: None
 [2003-05-22 03:12 UTC] jcarlos at info-ab dot uclm dot es
Sorry for my english.

In Bug #23475: mktime() of dates before 1 jan 1970 gives a timestamp of "-3662"
In this case gives a timestamp of "-1"

Apache/2.0.45 (Win32) 
if $year<=1970 or $year>=2039
In linux? 

This code:
if(!isset($year)) $year="2039";
$t=mktime ( 0, 0, 0, $month, $day, $year);
echo date("m-d-Y", $t)." -------- ".$t;
Warning: mktime() [function.mktime]: Windows does not support negative values for this function in E:\Archivos de programa\Apache Group\Apache2\htdocs\k.php on line x



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-22 05:56 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

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