php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jcarlos at info-ab dot uclm dot es
New email:
PHP Version: OS:

 

 [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) 
PHP/4.3.1
if $year<=1970 or $year>=2039
In linux? 

This code:
-------------------------------------------------
<?
if(!isset($year)) $year="2039";
$month="1";
$day="1";
$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

Thanks

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-22 05:56 UTC] derick@php.net
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 http://www.php.net/support.php 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: Fri Dec 27 15:01:29 2024 UTC