#23748 [NEW]: mktime function return -1 if year<=1970 or year>=2039
| From: | jcarlos at info-ab dot uclm dot es | Date: | Thu, 22 May 2003 08:12:48 +0000 |
| Subject: | #23748 [NEW]: mktime function return -1 if year<=1970 or year>=2039 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-40178@lists.php.net to get a copy of this message | ||
From: jcarlos at info-ab dot uclm dot es
Operating system: Win32
PHP version: 4.3.1
PHP Bug Type: Date/time related
Bug description: mktime function return -1 if year<=1970 or year>=2039
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
--
Edit bug report at http://bugs.php.net/?id=23748&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23748&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23748&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23748&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23748&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23748&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23748&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23748&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23748&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23748&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23748&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23748&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23748&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23748&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23748&r=gnused