This commit is contained in:
Naomi 2013-08-14 16:39:50 -04:00
parent 673c422015
commit 7cf654551d

View file

@ -255,18 +255,18 @@ class Application_Service_HistoryService
$timezoneLocal = new DateTimeZone($this->timezone); $timezoneLocal = new DateTimeZone($this->timezone);
$boolCast = array(); $boolCast = array();
foreach ($fields as $index=>$field) { foreach ($fields as $index=>$field) {
if ($field["type"] == TEMPLATE_BOOLEAN) { if ($field["type"] == TEMPLATE_BOOLEAN) {
$boolCast[] = $field["name"]; $boolCast[] = $field["name"];
} }
} }
//need to display the results in the station's timezone. //need to display the results in the station's timezone.
foreach ($rows as $index => &$result) { foreach ($rows as $index => &$result) {
foreach ($boolCast as $name) { foreach ($boolCast as $name) {
$result[$name] = (bool) $result[$name]; $result[$name] = (bool) $result[$name];
} }
$dateTime = new DateTime($result["starts"], $timezoneUTC); $dateTime = new DateTime($result["starts"], $timezoneUTC);