if I apply date() to my timestamp example it echoes 2007,10, 09
in order to verify that the reverse is correct
I try generating a timestamp from
(0,0,0,10,9,2007)
but the result is not the expected one
how could I make a timestamp from a date using the above value?
I may not figure what I am missing in the following code
in order to verify that the reverse is correct
I try generating a timestamp from
(0,0,0,10,9,2007)
but the result is not the expected one
how could I make a timestamp from a date using the above value?
I may not figure what I am missing in the following code
Code:
<?php
//EXAMPLE
$regTime=1191955182;
$reg_time= date("Y-m-d",$regTime);
echo"reg_time: $reg_time<P>"; // echo 2007-10-09
// B) reverse date to timestamp
// and the returned result is not correct
// 1191902400 instead of expected 1191955182
$timestamp= mktime(0,0,0,10,9,2007); // note no leading zero m d y
echo"mktime: $timestamp<P>";
?>