User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

{DateTime format="string" timezone="string" /}

Displays always the actual time in a formatted string.

Params for DateTime:

format: Defines the format of the displayed time. For additional information on what you can use in this parameter, have a look at the manual for the date function.

Predefined values are:

datetime // renders as Fri, 21 Jul 2017 18:35:38 +0000

date // 21.07.2017

time // 18:35

year // 2017

month // July

week // 29

day // Friday

timezone: If you have not set your timezone in the php.ini file or you want the time in a different timezone to be displayed, then you can set a specific timezone. For valid entries have a look at the List of Supported Timezones.

How to use it:

{DateTime format="datetime"/}
{DateTime format="d.m.Y H:i" timezone="Europe/Berlin"/}
{DateTime format="Y-m-d H:i" timezone="Asia/Tokyo"/}
{DateTime format="Y-m-d H:i" timezone="Asia/Singapore"/}
{DateTime format="Y-m-d g:i A" timezone="America/New_York"/}


Fri, 21 Jul 2017 18:35:38 +0000

21.07.2017 20:35 // current time in Berlin

2017-07-22 03:35 // Tokyo

2017-07-22 02:35 // Singapore

07/21/2017 2:35 PM // New York

Available for: