my date format from my db was Y-m-d h:i:s sample: 2017-08-30 19:19:20 and im trying to display that date on my page..
but the problem is when it displays on my page the date was different compared to the data from my db..
like data from db was
2017-08-21 18:00:00
2017-08-24 18:00:00
2017-08-30 18:00:00
but the date that was being displayed was
12/31/1969 6:00 PM
12/31/1969 6:00 PM
12/31/1969 6:00 PM
this is the format that i use..
<?php echo date('m/d/Y H:i a',strtotime($date)); ?>
$date is the date from my db..
the date should be
08/21/2017 6:00 PM
08/24/2017 6:00 PM
08/30/2017 6:00 PM
any idea why this happens and any possible solution for this?..