- $this->start_time = strtotime($start_date . ' ' . $start_time);
- $this->end_time = strtotime($end_date . ' ' . $end_time);
+ if (empty($endTime)) {
+ $endTime = '00:00';
+ }
+
+ $start = $startDate . ' ' . $startTime;
+
+ common_debug("Event start: '$start'");
+
+ $end = $endDate . ' ' . $endTime;
+
+ common_debug("Event start: '$end'");
+
+ $this->startTime = strtotime($start);
+ $this->endTime = strtotime($end);
+
+ if ($this->startTime == 0) {
+ throw new Exception(sprintf(_('Could not parse date "%s"'),
+ $start));
+ }
+
+
+ if ($this->endTime == 0) {
+ throw new Exception(sprintf(_('Could not parse date "%s"'),
+ $end));
+ }