|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #22620 gmmktime returns bogus STILL in 4.3.1
Submitted: 2003-03-10 06:01 UTC Modified: 2003-03-11 16:43 UTC
From: space at arch dot ch Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.1 OS: Windows 2000
Private report: No CVE-ID: None
 [2003-03-10 06:01 UTC] space at arch dot ch
c'mon guys. this is a real pain:

on windows systems gmmktime returns bogus. the bug has been known for at least 2 years! it's been reported more than once! will this finally be fixed or not??? 

there have been other bug reports, but all of them seem to have been ignored so far, although this is NOT some minor issue!

at least include a documentation of the bug in the php manual for gmmktime if you do not intend to fix it!  [..saying that the function cannot be used on win platforms] :((

as seen in other posts. try: gmmktime(0,0,0,1,1,1970); which should return 0 but does not [unless you are in GMT]!!! 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-10 09:45 UTC]
See bug #22457

 [2003-03-11 03:51 UTC] space at arch dot ch
please at least read the post! this is a WINDOWS issue. *nix/solaris installations do not have the problem!

#22457 seemed to be about win. the reply about unix. [???]

gmmktime(0,0,0,1,1,1970); gives:

Warning: gmmktime() [function.gmmktime]: Windows does not support negative values for this function


#14391 is referred in #22457 and describes the problem thoroghly. but no solution has been presented since 2 years.

the question is, if this will be fixed for windows platforms or not.
 [2003-03-11 11:25 UTC]
yeah, it's still documentation issue.
We can't fix windows, you need to ask Microsoft to do that.

 [2003-03-11 16:38 UTC]
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
In case this was a documentation problem, the fix will show up soon at

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

 [2003-03-11 16:43 UTC]
Added a note in the manual page for gmdate about the broken system libs in Windows.
 [2004-06-20 20:28 UTC] emf_jth at bellsouth dot net
GMDATE() Workaround for Microsoft Server:

Use the following gmstrftime() verus gmdate() to calculate elapsed time.

To return amount of time on online:
$time_online = time(); ex: 1087064037 (06/20/2004 13:13:57)

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 13:01:27 2023 UTC