trying to have a basic time stamp next to my posts on a cms but strtotime is giving me issues.
So i have this:
$postDate = $row['date'];
$written_month = date("F", strtotime($postDate));
$short_month = substr($written_month, 0, 3);
$day_number = date("j", strtotime($postDate));
echo '
<div id="postTimeStamp">
<div id="postTimeStamp_day">
'.$day_number.'
</div>
<div id="postTimeStamp_month">
'.$short_month.'
</div>
</div>
';
I cant figure out why but the day is always the 1st and the month is january.
If i do
$echo $postDate;
It shows the dat correctly.
In the DB the date is stored as e.g. 10/12/2013.
Where am i going wrong?
Craig.