Add date format to battery update

parent 0a43cb6a
......@@ -76,7 +76,11 @@ class CarwingsBattery {
try {
this.dateTime = new DateFormat('MMM DD, yyyy HH:mm a').parse(recs['OperationDateAndTime']);
} catch (e) {
this.dateTime = new DateTime.now(); // Just use now
try {
this.dateTime = new DateFormat('d-MMM-yyyy HH:mm').parse(recs['OperationDateAndTime']);
} catch (e) {
this.dateTime = new DateTime.now(); // Just use now
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment