All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

The start_time and end_time tags always return the default %H:%i regardless of what is in the format="" parameter

Stephen 29 Nov 2012 16:59 problem, complete

I'm having some trouble with the {event_dates:start_time format=", %H:%i"} and {event_dates:end_time format=", %H:%i"} tag. I've copied the example code from the documentation at the bottom of this page - http://gotolow.com/addons/low-events/.... The problem is that the start_time and end_time tags are always returning the default time of %H:%i regardless of what I have in the format parameter. So in the example, the comma is not being included. If I change %H to %h it still returns the time in 24 hour format. I've double checked my Default Time Formatting setting in EE and it's set to "United States".

I've used this module on other sites and used the exact same code with no problems. Any ideas? I'm running EE 2.5.3 and PHP 5.3.3.

Thanks for your help.

Replies

  1. Low 29 Nov 2012 21:16

    You're absolutely right. It's a silly bug that I'll get fixed straight away.

    To fix for now, open up ft.low_events.php, and change line #628 and #629 from this:

    if ( ! isset($params['format'])) $params['format'] = '%H:%i'; 
    return $this->date->ee_format($params['format'], @$params['lang']);


    to this:

    if ( ! $format) $format = '%H:%i'; 
    return $this->date->ee_format($format, @$params['lang']);


    ...and all should be well.

    I'll get it fixed for the next version.

  2. Stephen 30 Nov 2012 17:06

    Perfect - thanks for the quick response and the quick fix. This works perfectly now!

  3. Low 30 Nov 2012 19:16

    FYI, v1.1.1 contains this fix.