diff options
Diffstat (limited to 'config/autoconfigbackup/autoconfigbackup.php')
-rw-r--r-- | config/autoconfigbackup/autoconfigbackup.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.php b/config/autoconfigbackup/autoconfigbackup.php index 5bf40736..d384e3dd 100644 --- a/config/autoconfigbackup/autoconfigbackup.php +++ b/config/autoconfigbackup/autoconfigbackup.php @@ -350,12 +350,23 @@ EOF; // Loop through and create new confvers $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(); $tmp_array['username'] = $ds_split[0]; $tmp_array['reason'] = $ds_split[1]; $tmp_array['time'] = $ds_split[2]; + + /* Convert the time from server time to local. See #5250 */ + $budate = new DateTime($tmp_array['time'], $acbtz); + $budate->setTimezone($mytz); + $tmp_array['time'] = $budate->format(DATE_RFC2822); + if ($ds_split[2] && $ds_split[0]) { $confvers[] = $tmp_array; } |