I have a german date format, that looks like this:
Montag, 21. Dezember 2015
Now I want to convert this string to a unix timestamp. I tried to use:
date_parse_from_format("l, d. F Y", "Montag, 21. Dezember 2015");
But there are two problems:
The german month isn't accepted, so I created an array containing every german and english month, so I only have to replace it.
[year] => 2015 [month] => [day] => 21
The result of the function returns the timestamp in the current timezone. Stupid Workaround: simply adding 10800.
So is there a good solution to get the right timestamp?