From 6ff225f57eeabaab605dc01dd5206f38fd8ca17b Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 5 Sep 2017 15:22:18 +0800 Subject: [PATCH] MDL-59392 calendar: Correct the next period (add vs sub) --- calendar/classes/external/month_exporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/classes/external/month_exporter.php b/calendar/classes/external/month_exporter.php index 870687e9637..2a1988f459e 100644 --- a/calendar/classes/external/month_exporter.php +++ b/calendar/classes/external/month_exporter.php @@ -279,7 +279,7 @@ class month_exporter extends exporter { */ protected function get_next_month_timestamp() { $date = $this->related['type']->timestamp_to_date_array($this->calendar->time); - $month = calendar_sub_month($date['mon'], $date['year']); + $month = calendar_add_month($date['mon'], $date['year']); $monthtime = $this->related['type']->convert_to_gregorian($month[1], $month[0], 1); return make_timestamp($monthtime['year'], $monthtime['month'], $monthtime['day'], $monthtime['hour'], $monthtime['minute']);