Change time format to work with older PHP (before 5.3)

This commit is contained in:
Zach Copley 2011-09-17 13:27:14 -07:00
parent 467b840c44
commit baa17381c0

View File

@ -124,7 +124,7 @@ class EventForm extends Form
$this->li(); $this->li();
$times = EventTimeList::getTimes($today->format('m/d/Y 12:00') . ' am ' . $today->format('T')); $times = EventTimeList::getTimes($today->format('m/d/Y 12:00') . ' am ' . $today->format('T'));
$start = EventTimeList::nearestHalfHour('@' . $today->getTimestamp()); $start = EventTimeList::nearestHalfHour($today->format('c'));
$start->setTimezone(new DateTimeZone(common_timezone())); $start->setTimezone(new DateTimeZone(common_timezone()));
$this->out->dropdown( $this->out->dropdown(
@ -160,7 +160,7 @@ class EventForm extends Form
'event-endtime', 'event-endtime',
// TRANS: Field label on event form. // TRANS: Field label on event form.
_m('LABEL','End time'), _m('LABEL','End time'),
EventTimeList::getTimes('@' . $start->getTimestamp(), true), EventTimeList::getTimes($start->format('c'), true),
// TRANS: Field title on event form. // TRANS: Field title on event form.
_m('Time the event ends.'), _m('Time the event ends.'),
false, false,