The assumptions being made about the date format in http://cgit.drupalcode.org/cm_tv_schedules/tree/cm_tv_schedules.module#n105 can cause all dates to be converted to the same time.

I'm not sure if this issue is related to the versions of Date, Views, Calendar, etc but it's an issue when the hour is both a single number (1,2,3,4), but also when the hour is "Before 1". With PHP 5.5 $time = strtotime($hour['hour']), sets all times to 6:00. The hour element is a string and can be a variety of non time values.

I'm still working on a patch for this, but I think converting the $key to the hour is a better approach. That value will always be the 24 version of the hour with the 30 or 15 minute increment, so it can be safely converted to just the hour for grouping.

CommentFileSizeAuthor
#1 Screen Shot 2014-09-03 at 6.26.11 AM.png198.5 KBkreynen

Comments

kreynen’s picture

Issue summary: View changes
StatusFileSize
new198.5 KB

  • emilyf committed f2e4bf6 on 7.x-2.x
    Issue #2332185: incorrect date/time format on 12 hour, added 3 time...
emilyf’s picture

Status: Active » Fixed

Looks like the strtotime wasn't formatting properly because it was only being passed $hour['hour'] - passing $hour['ampm'] as well allows it to format. In addition, added another option now so choices are:

- 24 h format
- 12 hour format with minutes
- 12 hour format without minutes

Will be rolled into tonight's release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.