The settings for the date, time, and time zone can be found in the Date and Time section of the System>Settings module within the Contao Back end. Each of these settings are formatted so that they can be parsed per the PHP date() function but are restricted in order to be displayed using UNIX timestamp requirements. In other words, the format for a date and time will appear per a specific standard. The UNIX standard means that you are limited to using only numeric date and time formats. For more information on these values, see the PHP manual for the PHP date function. The following tutorial explains how to find the Date and Time section in the System>Settings back end module and make changes to each value.
Letter Abbreviation | Definition | Numeric values |
---|---|---|
j | Date without leading zeros | 1 through 31 |
d | Day of the month, 2 digits with leading zeros | 01 through 31 |
m | Numeric representation of a month with leading zeros | 01 through 12 |
n | Numeric representation of a month without leading zeros | 1 through 12 |
y | Two-digit representation of a year | example: 99 or 13 |
Y | Four-digit representation of a year | example: 1999 or 2013 |
g | 12-hour format of an hour without leading zeros | 1 through 12 |
G | 24-hour format of an hour without leading zeros | 0 through 23 |
h | 12-hour format of an hour with leading zeros | 01 through 12 |
H | 24-hour format of an hour with leading zeros | 00 through 23 |
I | Indicates if using daylight savings time | 1 if Daylight Savings time, 0 if not |
s | Seconds with leading zeros | 00 through 59 |
Date and Time settings affect all entries being logged within Contao and where ever these values are being used. To see this change in action, we will show a portion of the System Log. The four-digit year and time has been changed to 12-hour with leading zeros. The year format change is easily seen, but the time entry can be best observed by looking at the second System Log screenshot. Under the entry noting the change in format, the time changes from 00:50 to 12:50.
Time And Date settings | Screenshot of System Log |
---|---|
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: |
877-595-4HUB (4482) 757-416-6627 (Intl.) |
Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!