diff --git a/web/ajax/snapshots.php b/web/ajax/snapshots.php index c01e2ddbb..7426bb5f0 100644 --- a/web/ajax/snapshots.php +++ b/web/ajax/snapshots.php @@ -109,11 +109,12 @@ function deleteRequest($id) { function queryRequest($search, $advsearch, $sort, $offset, $order, $limit) { + global $dateTimeFormatter; $data = array( 'total' => 0, 'totalNotFiltered' => 0, 'rows' => array(), - 'updated' => preg_match('/%/', DATE_FMT_CONSOLE_LONG) ? strftime(DATE_FMT_CONSOLE_LONG) : date(DATE_FMT_CONSOLE_LONG) + 'updated' => $dateTimeFormatter->format(time()) ); // Put server pagination code here @@ -207,7 +208,7 @@ function queryRequest($search, $advsearch, $sort, $offset, $order, $limit) { //$row['Archived'] = $row['Archived'] ? translate('Yes') : translate('No'); //$row['Emailed'] = $row['Emailed'] ? translate('Yes') : translate('No'); //$row['Cause'] = validHtmlStr($row['Cause']); - $row['CreatedOn'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['CreatedOn'])); + $row['CreatedOn'] = $dateTimeFormatter->format(strtotime($row['CreatedOn'])); //$row['StartDateTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['StartDateTime'])); //$row['EndDateTime'] = $row['EndDateTime'] ? strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['EndDateTime'])) : null; //$row['Length'] = gmdate('H:i:s', $row['Length'] ); diff --git a/web/ajax/watch.php b/web/ajax/watch.php index 367ab45c3..0642d4bfa 100644 --- a/web/ajax/watch.php +++ b/web/ajax/watch.php @@ -64,7 +64,7 @@ foreach ( $rows as $row ) { // Modify the row data as needed $row['imgHtml'] = 'Event '.$event->Id().''; $row['Name'] = validHtmlStr($row['Name']); - $row['StartDateTime'] = strftime(STRF_FMT_DATETIME_SHORTER, strtotime($row['StartDateTime'])); + $row['StartDateTime'] = $dateTimeFormatter->format(strtotime($row['StartDateTime'])); $row['Length'] = gmdate('H:i:s', $row['Length'] ); $returned_rows[] = $row;