TZ changes
This commit is contained in:
@@ -47,9 +47,10 @@ foreach ($payload['data'] as $key => $field) {
|
||||
$columns[] = $columnMapping[$name];
|
||||
$value = $field['value'];
|
||||
|
||||
// Transform ETA and ETD to MySQL datetime format
|
||||
// Transform ETA and ETD to MySQL datetime format in UTC
|
||||
if ($name == "ETA" || $name == "ETD") {
|
||||
$date = DateTime::createFromFormat('d/m/Y H:i', $value);
|
||||
$date = DateTime::createFromFormat('d/m/Y H:i', $value, new DateTimeZone('Europe/London'));
|
||||
$date->setTimezone(new DateTimeZone('UTC')); // Convert to UTC
|
||||
$value = $date->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user