From fc46764db66f145e8129eff75cdd53832a1f5587 Mon Sep 17 00:00:00 2001 From: Eloy Lafuente Date: Tue, 27 Jul 2010 23:11:54 +0000 Subject: [PATCH] MDL-21432 backup - improve start date offset --- backup/util/plan/restore_structure_step.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backup/util/plan/restore_structure_step.class.php b/backup/util/plan/restore_structure_step.class.php index 8a1db6c3f9f..1eb1d80860b 100644 --- a/backup/util/plan/restore_structure_step.class.php +++ b/backup/util/plan/restore_structure_step.class.php @@ -277,6 +277,11 @@ abstract class restore_structure_step extends restore_step { */ protected function apply_date_offset($value) { + // 0 doesn't offset + if ($value == 0) { + return $value; + } + static $cache = array(); // Lookup cache if (isset($cache[$this->get_restoreid()])) { -- 2.43.0