summaryrefslogtreecommitdiff
path: root/Postman/Postman-Email-Log
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Email-Log')
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogController.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php
index a6e5179..e94eb43 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogController.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php
@@ -97,14 +97,20 @@ class PostmanEmailLogController {
$fp = fopen('php://output', 'wb');
$headers = array_keys( PostmanLogFields::get_instance()->get_fields() );
+ $headers[] = 'delivery_time';
+
fputcsv($fp, $headers);
+ $date_format = get_option( 'date_format' );
+ $time_format = get_option( 'time_format' );
+
foreach ( $logs->posts as $log ) {
$meta = PostmanLogFields::get_instance()->get($log->ID);
$data = [];
foreach ( $meta as $header => $line ) {
$data[] = $line[0];
}
+ $data[] = date( "$date_format $time_format", strtotime( $log->post_date ) );
fputcsv($fp, $data);
}