php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37107 mktime function
Submitted: 2006-04-17 16:01 UTC Modified: 2006-04-17 16:40 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: eyglys at yahoo dot com dot br Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID: None
 [2006-04-17 16:01 UTC] eyglys at yahoo dot com dot br
Description:
------------
mktime don't read a param minutes.

Reproduce code:
---------------
<?
$date = mktime(10,30,40,1,1,1970);
echo date("d/m/Y H:m:s",$date);
?>

Expected result:
----------------
01/01/1970 10:30:40

Actual result:
--------------
01/01/1970 10:01:40

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-17 16:34 UTC] scottmacvicar at ntlworld dot com
Read http://www.php.net/manual/en/function.date.php

m prints the month number with leading 0, hence why H:m:s produces 10:01:40
 [2006-04-17 16:40 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See http://php.net/date to see what \"m\" does.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 18:01:31 2024 UTC