I am using the current time and date in MySQL using
$datecreated = date("Y-m-d, g:i:s A");
Then showing it to the user
$datecreated = date('n-j-Y, g:i:s A', strtotime($row['datecreated']));
Everything works fine, except that time is always AM. I checked it in the morning and afternoon, and still AM.
source
share