Menu

#626 Time and Date Configuration

Parent Category:
DPCalendar
Category:
Configuration
Last Updated:
Allon Moritz, Monday, 22 August 2022 12:58
Created:
Wednesday, 06 June 2012 10:32
Hits:
29762

Introduction

The DPCalendar Joomla event manager offers options within a module or menu link configuration to adapt the date and time format of the displayed events. This means the user can customize the date appearance to suit their needs and target audience.

The PHP date commands allow you to render the date in almost any combination you wish. To achieve that, the date and time configuration must fit the PHP date syntax.

Time and date options

Date formats

The following list are examples of date and time formats:

  • d.m.Y H:i transforms into 12.04.2011 15:38
  • h a transforms into 8 pm
  • c transforms into 2012-02-12T15:19:21+00:00
  • D, j M Y G:i:s transforms into Sat, 19 Jun 2010 15:09:35

Every date command is executed within the translator. Means you can use ordinary strings as date or time format and then do a language override for them. This offers the possibility to use different formats per language.

Timezone setup

Joomla has different timezone settings, the global Joomla timezone and the user timezone. As default the user timezone inherits from the Joomla timezone, means when the Joomla timezone changes then the user timezone changes too. Timezones are important for a Calendar and Event manager extension like DPCalendar is, as it defines how dates are displayed and how day light summer time (DST) is handled. Initially every Joomla site comes with the UTC timezone pre configured. The timezone in Joomla can be changed on the following link System -> Global Configuration -> Server tab.

Time and date timezone

Timezone switcher

Additionally you can enable the timezone switcher in the DPCalendar options, which allows to change the actual timezone by the visitor himself on every page. When the browser timezone differes than the options timezone, an information panel is shown to switch the timezone to the browser one.

Time and date timezone

Change time display

DPCalendar renders the start and end time according to the event set up. This means when the event is an all day event, then only the dates are displayed, otherwise the times as well.

Hide end time per event

There is an additional setting when you edit an event where you can hide the end time. This means that DPCalendar will not show anywhere the end time of the event. You still have to set it for export reasons, but within DPCalendar it will not be displayed.

Override event output

Sometimes site admins do want to change the order of the dates or display only part of it, etc. To achieve this you need to create a layout override (not a template override).

Copy the file /components/com_dpcalendar/layouts/event/datestring.php to /templates/{{your template}}/html/layouts/com_dpcalendar/event/datestring.php and adapt the it to your needs.

Event time display

Comments (0)

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.