php - Why doesn't this code render the time in addition to the date? -
this code renders date (month, day, year) not time. being used on php upload site. grateful suggestions. thank you.
<time datetime="<?= date( 'm-d-y', strtotime( $file->added ) ) ?>"><?= date( 'm.d.y', strtotime( $file->added ) ) ?>
you need add request output time parameter 1 of date() function.
<time datetime="<?= date( 'm-d-y h:i:s', strtotime( $file->added ) ) ?>"><?= date( 'm.d.y h:i:s', strtotime( $file->added ) ) ?>
Comments
Post a Comment