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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Thu May 30 23:01:36 2024 UTC