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 Tue, 27 Jun 2017 05:22:42 +0000

date // 27.06.2017

time // 05:22

year // 2017

month // June

week // 26

day // Tuesday

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"/}


Tue, 27 Jun 2017 05:22:42 +0000

27.06.2017 07:22 // current time in Berlin

2017-06-27 14:22 // Tokyo

2017-06-27 13:22 // Singapore

06/27/2017 1:22 AM // New York

Available for: