Closed m1geo closed 6 years ago
I had a quick poke around. Added a simple string printer to the convertTimezone(...):
echo("String: " . $timestamp . "<br>\n");
The following output shows the issue:
String: 2018-04-01 04:09:04.978 String: 2018-04-01 04:08:22.983 String: 2018-04-01 04:08:09.183 String: 2018-04-01 04:07:42.321 String: 2018-04-01 04:07:41.115 String: ary file /opt/MMDVMHost [crash]
Clearly it cannot parse: "ary file /opt/MMDVMHost"
Not sure why this happens, or why it's trying to parse such a string?
George M1GEO
I fixed (think hacked!) it with a try and catch block:
function convertTimezone($timestamp) { try { $date = new DateTime($timestamp); $date->setTimezone(new DateTimeZone(TIMEZONE)); return $date->format('Y-m-d H:i:s'); } catch (Exception $err) { //echo 'Error: ' . $err->getMessage(); } }
If this is the way it works, please make a pull request. Tnx-- Amateurfunk ist das, was uns verbindet! Bleiben wir in Kontakt! Ortsverband Q05, VölklingenAm 02.04.2018 02:05 schrieb George Smart notifications@github.com:I fixed (think hacked!) it with a try and catch block:
function convertTimezone($timestamp) { try { $date = new DateTime($timestamp); $date->setTimezone(new DateTimeZone(TIMEZONE)); return $date->format('Y-m-d H:i:s'); } catch (Exception $err) { //echo 'Error: ' . $err->getMessage(); } }
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or mute the thread.
Hi folks. Issue in the latest commit. Cannot pass timezone. My timezone is BST:
The exact error in the CGI log is:
I guess this is following updates from the OS and the recently changed timezone (UTC to BST).
Thanks, George M1GEO.