Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mktime bug? 1

Status
Not open for further replies.

Rekcor

Programmer
Feb 15, 2005
48
0
0
NL
The following code is causing me a headache. I want to put: "12-25-2004 0:0:0" on the screen.

But the following code:

Code:
echo date('d-m-Y H:m:s', mktime(0,0,0,12,25,1978));

returns:

Code:
25-Dec-1978 12:12:00

What is happening?
 
since when was 25 a valid month ?



______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanx, the correct syntax is:

Code:
echo date('d-M-Y H:i:s', mktime(0,0,0,12,25,1978)); //25-Dec-1978 00:00:00
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top