SAAS-842: Schedule widget show time formatting problem

This commit is contained in:
drigato 2015-06-03 12:24:19 -04:00
parent df501d7a38
commit 3593a13064
1 changed files with 2 additions and 2 deletions

View File

@ -103,10 +103,10 @@ class WidgetHelper
foreach($shows as &$show) { foreach($shows as &$show) {
$startParseDate = date_parse($show['starts']); $startParseDate = date_parse($show['starts']);
$show["show_start_hour"] = str_pad($startParseDate["hour"], 2, "0").":".str_pad($startParseDate["minute"], 2, 0); $show["show_start_hour"] = str_pad($startParseDate["hour"], 2, "0", STR_PAD_LEFT).":".str_pad($startParseDate["minute"], 2, 0, STR_PAD_LEFT);
$endParseDate = date_parse($show['ends']); $endParseDate = date_parse($show['ends']);
$show["show_end_hour"] = str_pad($endParseDate["hour"], 2, 0).":".str_pad($endParseDate["minute"],2, 0); $show["show_end_hour"] = str_pad($endParseDate["hour"], 2, 0, STR_PAD_LEFT).":".str_pad($endParseDate["minute"],2, 0, STR_PAD_LEFT);
} }
$result[$weekCounter][$dow[$i]]["dayOfMonth"] = $dateParse["day"]; $result[$weekCounter][$dow[$i]]["dayOfMonth"] = $dateParse["day"];
$result[$weekCounter][$dow[$i]]["dayOfWeek"] = strtoupper(substr($dow[$i], 0, 3)); $result[$weekCounter][$dow[$i]]["dayOfWeek"] = strtoupper(substr($dow[$i], 0, 3));