From 047d749446401a40d9f88734e65a7a5a6ab24ad6 Mon Sep 17 00:00:00 2001 From: arzynik Date: Thu, 19 Jul 2012 13:57:16 -0700 Subject: [PATCH] change time format --- include/library/Crunchbutton/Restaurant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/library/Crunchbutton/Restaurant.php b/include/library/Crunchbutton/Restaurant.php index 6aa6e57d1..f5a2f14e6 100644 --- a/include/library/Crunchbutton/Restaurant.php +++ b/include/library/Crunchbutton/Restaurant.php @@ -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');