Loading...
 
Features / Usability

Features / Usability


SOLVED - Calendar events listed as AM/PM, not 24 hour format?

posts: 69

I have just volunteered to create a website for a local senior citizens group. They would like their site to include a calendar... but there is no way these folks are going to comprehend times in 24 hour format.

Is there a calendar switch somewhere for AM/PM time display?

-larryg

posts: 400

To display times in am/pm format, go to Admin->General->Date and Time and set the parameters there (click on the help link on the bottom to see how the syntax works).

If users are going to input events and use time selectors to set the event times, those time selectors are only in 24-hour format in version 6.x. But an option to show these selectors in am/pm format has been added for the next version (7) that is expected to be released sometime in May.

Hope that helps,
lindon

larryg wrote:

I have just volunteered to create a website for a local senior citizens group. They would like their site to include a calendar... but there is no way these folks are going to comprehend times in 24 hour format.

Is there a calendar switch somewhere for AM/PM time display?

-larryg

posts: 69

Lindon,

Thank you very much for that information. Interestingly, the read-only TIME settings work in one area of the Calendar but not another.

IF you drill down into an event on the calendar and look at its detail, that time is displayed based on the >Admin >General >Date/Time setting for LONG TIME FORMAT. This works properly.

However, IF you mouse-over an event on the monthly calendar, the time is displayed in 24 hour format. I had expected that this might be the SHORT TIME FORMAT in >Admin >General >Date/Time, but changing that preference has no effect on the mouse-over time display. Regardless of the LONG or SHORT time settings (currently defined as %I:%M %p %Z and %I:%M) the mouse-over time is always in 24 hour format.

See attached screenshot. Am I overlooking another setting somewhere?

TIA,

-larryg

posts: 69

The mouse-over display derives from the template file tiki-calendar_box.tpl. This template ignores the user preferences settings for Date and Time. Line 30 includes a hard-coded definition for time display in $H:$M format. Changing that line to:

{$cellstart|tiki_date_format:"%I:%M %p"} – {$cellend|tiki_date_format:"%I:%M %p"}

Results in mouse-over time in 12 hour format with am/pm indicators.

A more elegant method would refer to the >Admin >General >Date/Time preference settings... which unfortunately I do not know how to do.

-larry

posts: 400

LarryG,

Here's how to use the short time format:
{$cellstart|tiki_short_time} – {$cellend|tiki_short_time}

For the long format:
{$cellstart|tiki_long_time} – {$cellend|tiki_long_time}

I made changes in the project code last month to fix this as well as other spots where the time settings weren't being respected, but these are not yet in the released version (didn't think about that when I answered the first time) - they will appear in version 6.4.
Regards,
lindon

larryg wrote:

The mouse-over display derives from the template file tiki-calendar_box.tpl. This template ignores the user preferences settings for Date and Time. Line 30 includes a hard-coded definition for time display in $H:$M format. Changing that line to:

{$cellstart|tiki_date_format:"%I:%M %p"} – {$cellend|tiki_date_format:"%I:%M %p"}

Results in mouse-over time in 12 hour format with am/pm indicators.

A more elegant method would refer to the Admin General Date/Time preference settings... which unfortunately I do not know how to do.

-larry