php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #37282 Request to change mktime parameter order
Submitted: 2006-05-02 18:44 UTC Modified: 2006-05-03 10:27 UTC
From: caluml at gmail dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.4.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: caluml at gmail dot com
New email:
PHP Version: OS:

 

 [2006-05-02 18:44 UTC] caluml at gmail dot com
Description:
------------
Please can we get the mktime function accepting its parameters in a "standard" order?

Either small to big, or big to small, but something consistent.


It's insane as it is.


I did check to see if this had been reported, and couldn't find anything, so apologies if it has been.

Reproduce code:
---------------
print date("Y-m-d H:i:s", mktime(06,05,04,03,02,01) );


Expected result:
----------------
I expect to see either:

2006-05-04 03:02:01
or
2001-02-03 04:05:06

Actual result:
--------------
I see this:
2001-03-02 06:05:04

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-03 08:22 UTC] derick@php.net
Remember how many scripts this will break if we change it... so we won't change it.
 [2006-05-03 10:27 UTC] caluml at gmail dot com
I know that lots of scripts will break. But sometimes (global variables) it's necessary to break a few eggs to make an omelette.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 20 15:00:02 2025 UTC