|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-08-08 09:20 UTC] judy at neurotrax dot com
  [2002-08-08 09:23 UTC] sander@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
I have the following code snippets in a php4 file: <? echo "this seems to work:<br>"; $vis='2002-01-22'; list($y,$m,$d)=explode("-",$vis); $thisv=date("M j, Y",mktime(0,0,0,intval($m),intval($d),intval($y))); echo "date $vis [$m/$d/$y] => $thisv<br>"; echo "<p>so does this:<br>"; $vis='2002-06-03'; list($y,$m,$d)=explode("-",$vis); $thisv=date("M j, Y",mktime(0,0,0,intval($m),intval($d),intval($y))); echo "date $vis [$m/$d/$y] => $thisv<br>"; echo "<p>so why not this?<br>"; $vis='1928-07-10'; list($y,$m,$d)=explode("-",$vis); $thisv=date("M j, Y",mktime(0,0,0,intval($m),intval($d),intval($y))); echo "date $vis [$m/$d/$y] =>$thisv<br>"; echo "<p>or this?<br>"; $vis='1963-05-14'; list($y,$m,$d)=explode("-",$vis); $thisv=date("M j, Y",mktime(0,0,0,intval($m),intval($d),intval($y))); echo "date $vis [$m/$d/$y] =>$thisv<br>"; ?> which produce the following output: this seems to work: date 2002-01-22 [01/22/2002] => Jan 22, 2002 so does this: date 2002-06-03 [06/03/2002] => Jun 3, 2002 so why not this? date 1928-07-10 [07/10/1928] =>Dec 31, 1969 or this? date 1963-05-14 [05/14/1963] =>Dec 31, 1969 ================= upon further testing, the mktime function cannot handle any date BEFORE Dec 31, 1969... as in the following program output: --------------------------- or this? date 1970-01-01 [01/01/1970] => Jan 1, 1970 or this? date 1960-01-01 [01/01/1960] => Dec 31, 196 I searched your bug report area with the keyword mktime() and did not find anything about this. Is this a known bug?