[thelist] RE: wierd results from mktime

David Felton davidfelton at codemasters.com
Thu Mar 31 08:14:20 CST 2005


Ah, I see what's happening, I'm trying to grab the 31st day of Feb, which is
why it's popping out as March, I've updated it to this:

<?php
print"1st month: ".date("F Y",mktime(0,0,0,1,1))."<br>";
print"2nd month: ".date("F Y",mktime(0,0,0,2,1))."<br>";
print"3rd month: ".date("F Y",mktime(0,0,0,3,1))."<br>";
print"4th month: ".date("F Y",mktime(0,0,0,4,1))."<br>";
?>

 - which works

-----Original Message-----
From: David Felton 
Sent: 31 March 2005 15:00
To: 'thelist at lists.evolt.org'
Subject: wierd results from mktime


Can any one explain why when I run:

<?php
print"1st month: ".date("F Y",mktime(0,0,0,1))."<br>";
print"2nd month: ".date("F Y",mktime(0,0,0,2))."<br>";
print"3rd month: ".date("F Y",mktime(0,0,0,3))."<br>";
print"4th month: ".date("F Y",mktime(0,0,0,4))."<br>";
?>

I get the following output?

1st month: January 2005
2nd month: March 2005
3rd month: March 2005
4th month: May 2005



 - think it's something to do with today's date. Can anyone confirm they get
the same?



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************



More information about the thelist mailing list