Bug #1244 Updated: mktime is returning incorrect integer values for certain months of 1999
| From: | Bug Database | Date: | Thu, 18 Mar 1999 02:41:39 +0000 |
| Subject: | Bug #1244 Updated: mktime is returning incorrect integer values for certain months of 1999 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4675@lists.php.net to get a copy of this message | ||
ID: 1244
User Update by: jhedy@racingschools.com
Old-Status: Open
Status: Closed
Bug Type: Misbehaving function
Description: mktime is returning incorrect integer values for certain months of 1999
I was bit by "octal". by changing to MkTime (0,0,0,9,1,1999) it returns the correct
datetime.
<?
$coursedatetime = MkTime(0,0,0,03,01,1999);
print "March 1, 1999 UNIX datetime = $coursedatetime <br>";
$coursedatetime = MkTime(0,0,0,09,01,1999);
print "September 1, 1999 unix datetime = $coursedatetime <br>";
$coursedatetime = MkTime(0,0,0,12,01,1999);
print "December 1, 1999 UNIX datetime = $coursedatetime <br>";
?>
In my application I'm receiving back the following values:
March 1, 1999 UNIX datetime = 920264400
September 1, 1999 UNIX datetime = 912488400
December 1, 1999 UNIX datetime = 944024400
The problem is that the September value is previous to even the March value.
This is causing all kinds of grief in my application as I employ logic to only display
course enrollment dates for those courses with start dates greater than or
equal to the current day. My August and September courses are falling victim to this problem.
Thanks.
Full Bug description available at: http://ca.php.net/bugs.php3?id=1244
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net