Problem with date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 I have a problem with date function.

$gen_pos = mktime(0,0,1,10,25,2009);
$d1 = date("Y-m-d", $gen_pos);  	      // 2009-10-25
$d2 = date("Y-m-d", $gen_pos + (1*24*60*60)); // 2009-10-25
$d3 = date("Y-m-d", $gen_pos + (2*24*60*60)); // 2009-10-26
$d4 = date("Y-m-d", $gen_pos + (3*24*60*60)); // 2009-10-27
$d5 = date("Y-m-d", $gen_pos + (4*24*60*60));
$d6 = date("Y-m-d", $gen_pos + (5*24*60*60));
$d7 = date("Y-m-d", $gen_pos + (6*24*60*60));
$d8 = date("Y-m-d", $gen_pos + (7*24*60*60));

line 2 and line 3 return same date,its wrong ... it should be 2009-10-25 , 2009-10-26 ? :)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux