php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #22400 mktime does not permit negative values under windows. This is not documented.
Submitted: 2003-02-24 12:53 UTC Modified: 2003-02-25 19:54 UTC
From: alan at frostick dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.1 OS: WIN32
Private report: No CVE-ID: None
 [2003-02-24 12:53 UTC] alan at frostick dot com
PHP Manual (version 13-01-2003)
 
"Warning: mktime() [function.mktime.html]: Windows does not support negative values for this function"
This is not noted in the referenced manual page, in fact examples of how it can be used are given instead.

Presumably Windows users need a test like:
	if (PHP_OS=="WIN32")
		code_your_own_mktime(...);	// when negative values are to be used
	else
		mktime(...);			// Unix is OKAY with negative values

:-) from your friendly code_your_own dept...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-25 19:54 UTC] pollita@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC