I want to convert a date string to a specific date format
I'm currently using strtotime
to convert a date, but it doesn't get the correct hour
My code
<?php
$timestamp = 'Fri, 10 Aug 2018 11:00:00 GMT ';
$formatted = strtotime($timestamp);
echo date('Y-m-d H:i:s', $formatted);
?>
It gives me 01:00 pm instead of 11:00 Am i doing something wrong?