aboutsummaryrefslogtreecommitdiffstats
path: root/config/autoconfigbackup
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-11-12 15:52:54 -0500
committerjim-p <jimp@pfsense.org>2015-11-12 15:52:54 -0500
commit13fcabcbb24889a43afb3748bdda5e9905de1fe5 (patch)
tree8bdc7ec3533d6e56dada90c4cd34df4304de26b6 /config/autoconfigbackup
parenta9caf736867d5df0ff3b82c9e8500318832fa537 (diff)
downloadpfsense-packages-13fcabcbb24889a43afb3748bdda5e9905de1fe5.tar.gz
pfsense-packages-13fcabcbb24889a43afb3748bdda5e9905de1fe5.tar.bz2
pfsense-packages-13fcabcbb24889a43afb3748bdda5e9905de1fe5.zip
Convert save message date as well. Fixes #5250
Diffstat (limited to 'config/autoconfigbackup')
-rw-r--r--config/autoconfigbackup/autoconfigbackup.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.php b/config/autoconfigbackup/autoconfigbackup.php
index dcc7a489..9a7d67a1 100644
--- a/config/autoconfigbackup/autoconfigbackup.php
+++ b/config/autoconfigbackup/autoconfigbackup.php
@@ -82,6 +82,10 @@ if ($_REQUEST['download']) {
$pgtitle = "Diagnostics: Auto Configuration Backup";
}
+/* Set up time zones for conversion. See #5250 */
+$acbtz = new DateTimeZone('America/Chicago');
+$mytz = new DateTimeZone(date_default_timezone_get());
+
include("head.inc");
function get_hostnames() {
@@ -193,7 +197,9 @@ function get_hostnames() {
$savemsg = "An error occurred while trying to remove the item from portal.pfsense.org.";
} else {
curl_close($curl_session);
- $savemsg = "Backup revision {$_REQUEST['rmver']} has been removed.";
+ $budate = new DateTime($_REQUEST['rmver'], $acbtz);
+ $budate->setTimezone($mytz);
+ $savemsg = "Backup revision " . htmlspecialchars($budate->format(DATE_RFC2822)) . " has been removed.";
}
print_info_box($savemsg);
}
@@ -351,10 +357,6 @@ EOF;
$data_split = split("\n", $data);
$confvers = array();
- /* Set up time zones for conversion. See #5250 */
- $acbtz = new DateTimeZone('America/Chicago');
- $mytz = new DateTimeZone(date_default_timezone_get());
-
foreach ($data_split as $ds) {
$ds_split = split($oper_sep, $ds);
$tmp_array = array();