- $pattern =
- [
- ['#(\w+), (\d+/\d+/\d+) - (\d+:\d+)#', '$1, $2 $3'],
- ['#(\d+-\d+-\d+)T(\d+:\d+:\d+)ZZ#', '$1T$2Z'],
- ['#(\d+-\d+-\d+)T(\d+:\d+:\d+\.\d+)ZZ#', '$1T$2Z'],
- ['#(\w+), (\d+ \w+ \d+) (\d+:\d+:\d+) (.+)#', '$2 $3 $4'],
- ['#(\d+:\d+) (\w+), (\w+) (\d+), (\d+)#', '$1 $2 $3 $4 $5'],
- ];
-
- foreach ($pattern as $search_replace) {
- $dateString = preg_replace($search_replace[0], $search_replace[1], $dateString);
+ $search = ['Mär', 'März', 'Mai', 'Juni', 'Juli', 'Okt', 'Dez', 'ET' , 'ZZ', ' - ', '+', '+', ' (Coordinated Universal Time)'];
+ $replace = ['Mar', 'Mar' , 'May', 'Jun' , 'Jul' , 'Oct', 'Dec', 'EST', 'Z' , ', ' , '+' , '+' , ''];
+
+ $dateString = str_replace($search, $replace, $dateString);
+
+ $pregPatterns = [
+ ['#(\w+), (\d+ \w+ \d+) (\d+:\d+:\d+) (.+)#', '$2 $3 $4'],
+ ['#(\d+:\d+) (\w+), (\w+) (\d+), (\d+)#', '$1 $2 $3 $4 $5'],
+ ];
+
+ foreach ($pregPatterns as $pattern) {
+ $dateString = preg_replace($pattern[0], $pattern[1], $dateString);