diff --git a/pandora_console/operation/events/export_csv.php b/pandora_console/operation/events/export_csv.php index d820b8302a..5fad9124bd 100644 --- a/pandora_console/operation/events/export_csv.php +++ b/pandora_console/operation/events/export_csv.php @@ -250,6 +250,17 @@ try { echo csv_format_delimiter(io_safe_output($custom_data)); break; + case 'timestamp': + $target_timezone = date_default_timezone_get(); + $utimestamp = $row['utimestamp']; + $datetime = new DateTime("@{$utimestamp}"); + $new_datetime_zone = new DateTimeZone($target_timezone); + $datetime->setTimezone($new_datetime_zone); + $formatted_date = $datetime->format('Y-m-d H:i:s'); + + echo csv_format_delimiter($formatted_date); + break; + default: echo csv_format_delimiter(io_safe_output($row[$key])); break;