Wrong Date
-
When I use the php <?php echo “Today is: ” . (date(“l M d, Y”) . “
“;?> anywhere in my site the correct date (and time) are reflected.
When I use it in a Worpress page it returns the next day. I had to work around it using:<?php $yesterday = mktime(0, 0, 0, date(“m”) , date(“d”)-1, date(“Y”)); $tdate = getdate($yesterday);
echo ” Today is: “.@$tdate[month] .” “.@$tdate[mday] .”, ” . @$tdate[year].”
“;
echo ” Day of the year: “.@$tdate[yday].”<hr />”;?>Anybody else experience this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Wrong Date’ is closed to new replies.