From bc0d3295b320f7c899159862f9933b082560e40a Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 24 Mar 2017 11:42:21 +0000 Subject: [PATCH] Fix for daylight savings time issue for past days in the Inbound Reports git-svn-id: svn://192.168.202.10@2712 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/vicidial/AST_CLOSER_service_level.php | 3 +++ www/vicidial/AST_CLOSERstats.php | 3 +++ www/vicidial/AST_CLOSERstats_v2.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/www/vicidial/AST_CLOSER_service_level.php b/www/vicidial/AST_CLOSER_service_level.php index 6e98195f..b1ea0384 100644 --- a/www/vicidial/AST_CLOSER_service_level.php +++ b/www/vicidial/AST_CLOSER_service_level.php @@ -35,6 +35,7 @@ # 160714-2348 - Added and tested ChartJS features for more aesthetically appealing graphs # 160819-0054 - Fixed chart bugs caused by DST # 170227-1714 - Fix for default HTML report format, issue #997 +# 170323-2247 - Added debug variable # $startMS = microtime(); @@ -57,6 +58,8 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];} elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];} elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];} if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];} diff --git a/www/vicidial/AST_CLOSERstats.php b/www/vicidial/AST_CLOSERstats.php index 98891a2f..b2c5b0e7 100644 --- a/www/vicidial/AST_CLOSERstats.php +++ b/www/vicidial/AST_CLOSERstats.php @@ -55,6 +55,7 @@ # 160714-2348 - Added and tested ChartJS features for more aesthetically appealing graphs # 160819-0054 - Fixed chart bugs # 170227-1715 - Fix for default HTML report format, issue #997 +# 170324-0740 - Fix for daylight savings time issue # $startMS = microtime(); @@ -2832,6 +2833,8 @@ while ($j < $calls_to_print) $Cqueue[$j] = $row[1]; $Cepoch[$j] = $row[2]; $Cdate[$j] = $row[3]; + $dst=date("I", strtotime($Cdate[$j])); + $epoch_offset = (($local_gmt + $dst) * 3600); $Crem[$j] = ( ($Cepoch[$j] + $epoch_offset) % 86400); # find the remainder(Modulus) of seconds since start of the day # $MAIN.="|$Cepoch[$j]|$Crem[$j]|$Cdate[$j]|\n"; $j++; diff --git a/www/vicidial/AST_CLOSERstats_v2.php b/www/vicidial/AST_CLOSERstats_v2.php index 462e22ca..7f563088 100644 --- a/www/vicidial/AST_CLOSERstats_v2.php +++ b/www/vicidial/AST_CLOSERstats_v2.php @@ -59,6 +59,7 @@ # 160819-0054 - Fixed chart bugs # 161207-2037 - Fix for issue #982, formatting # 170227-1708 - Fix for default HTML report format, issue #997 +# 170324-0741 - Fix for daylight savings time issue # $startMS = microtime(); @@ -3177,6 +3178,8 @@ while ($j < $calls_to_print) $Cqueue[$j] = $row[1]; $Cepoch[$j] = $row[2]; $Cdate[$j] = $row[3]; + $dst=date("I", strtotime($Cdate[$j])); + $epoch_offset = (($local_gmt + $dst) * 3600); $Crem[$j] = ( ($Cepoch[$j] + $epoch_offset) % 86400); # find the remainder(Modulus) of seconds since start of the day # $MAIN.="|$Cepoch[$j]|$Crem[$j]|$Cdate[$j]|\n"; $j++;