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
This commit is contained in:
mattf
2017-03-24 11:42:21 +00:00
parent 00754f4d26
commit 89fdf967bf
3 changed files with 9 additions and 0 deletions
@@ -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"];}
@@ -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++;
@@ -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++;