Problem/Motivation

If you enter a single day event with a one hour time span, e.g. Jun 06 2013, 4:00am - 5:00am the following will be rendered on publish:

Jun 06 2013 - Jun 06 2013 to Jun 06 2013, 4:00am - 5:00am MDT

The solution seems simple enough. Render instead Jun 06 2013, 4:00am - 5:00am. Seems it isn't that simple. Events with the same start and end time are equally whack:

Jun 06 2013 - 4:00am MDT

Seems that single day events are operating on a whole different plane. Completely ignoring my best attempts at hacking theme_commons_events_date_display_range_advanced in commons_events.module. My best result is still quite sad:

Jun 06 2013 - 4:00am - 5:00am

Rather than:

Jun 06 2013, 4:00am - 5:00am

So I'll leave my hacky patches off this issue. Line 502 suggests that Line 168 of date.theme holds insightful magic. I can read, but I can't figure out how to override date.theme.

Proposed resolution

Ask for insight. I'd be happy to work on a patch if someone can point me in the right direction... somewhat more specifically than see Line 168 of date.theme ;)

CommentFileSizeAuthor
#2 2013549-events-singleday-2.patch3.76 KBjaperry
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japerry’s picture

Assigned: Unassigned » japerry
japerry’s picture

Version: » 7.x-3.2
Status: Active » Needs review
FileSize
3.76 KB

This patch should fix single day events from showing the errors above.

japerry’s picture

Also, make sure you run updb. We make a change to our default date formatter.

stupiddingo’s picture

Status: Needs review » Reviewed & tested by the community

Brilliant! Looks good on same time, single day timespan and multi-day!

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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