Changeset:
95170415092e
https://sourceforge.net/p/mrbs/hg-code/ci/95170415092e9985e7b5073a93a313595b6a34be
Author:
Campbell Morrison <[email protected]>
Date:
Wed Sep 14 13:31:15 2016 +0100
Log message:
Fixed use of DateInterval class
diffstat:
web/functions.inc | 2 +-
web/report.php | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r e9d3df213e27 -r 95170415092e web/functions.inc
--- a/web/functions.inc Wed Sep 14 13:25:31 2016 +0100
+++ b/web/functions.inc Wed Sep 14 13:31:15 2016 +0100
@@ -350,7 +350,7 @@
else
{
// Otherwise we calculate the number of periods on the first day
- $startDate->add(new DateInterval('PT' . $periods_per_day . 'M'));
+ $startDate->add(new \DateInterval('PT' . $periods_per_day . 'M'));
$result = get_period_interval($start_time, $startDate->getTimestamp());
// Add in the number of whole days worth of periods in between
$result += ($interval_days - 1) * $periods_per_day;
diff -r e9d3df213e27 -r 95170415092e web/report.php
--- a/web/report.php Wed Sep 14 13:25:31 2016 +0100
+++ b/web/report.php Wed Sep 14 13:31:15 2016 +0100
@@ -943,8 +943,8 @@
$endDate = new DateTime();
$endDate->setTimestamp($report_end)->modify('12:00');
- $endDate->sub(new DateInterval('P1D')); // Go back one day because the
$report_end is at 00:00 the day after
- $endDate->add(new DateInterval('PT' . $periods_per_day . 'M'));
+ $endDate->sub(new \DateInterval('P1D')); // Go back one day because the
$report_end is at 00:00 the day after
+ $endDate->add(new \DateInterval('PT' . $periods_per_day . 'M'));
$increment = get_period_interval(max($row['start_time'],
$startDate->getTimestamp()),
min($row['end_time'],
$endDate->getTimestamp()));
------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits