change time format

This commit is contained in:
arzynik 2012-07-19 13:57:16 -07:00
parent 78ae9ca9be
commit 047d749446

View File

@ -38,9 +38,9 @@ class Crunchbutton_Restaurant extends Cana_Table {
$timezone = $timezone->format('O');
foreach ($hours as $hour) {
$open = new DateTime('today '.$hour->time_open, new DateTimeZone($this->timezone));
$open = new DateTime('next '.$hour->day. ' ' .$hour->time_open, new DateTimeZone($this->timezone));
$open->setTimezone(new DateTimeZone('GMT'));
$close = new DateTime('today '.$hour->time_close, new DateTimeZone($this->timezone));
$close = new DateTime('next '.$hour->day. ' ' .$hour->time_close, new DateTimeZone($this->timezone));
$close->setTimezone(new DateTimeZone('GMT'));
$hour->time_open = $open->format('Y-m-d H:i');
$hour->time_close = $open->format('Y-m-d H:i');