I want convert this date and time to german.
2019-12-22 19:45
to
Dienstag, 22. Dezember 2019 - 19:45
$start = strtotime('2019-12-22 19:45');
setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8');
// create format
// output (using current time)
echo strftime(" %d. %B %Y",$start);
got this result which not in german :(
22. December 2019
I am using wordpress and making shortcode, getting data from api just for informations
UPDATE
I am using this code now but still not got result like i want.
setlocale(LC_TIME, 'de_DE', 'de_DE.UTF-8');
$dt = new DateTime($event->start , new DateTimeZone('Europe/Berlin'));
echo $dt->format('d. F Y, H:i'); exit;
got this result
22. December 2019, 19:45
I tried this code but its not working.