enfrdeitptrues
Advertising

DateTime

{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 Wed, 18 Oct 2017 07:27:59 +0000

date // 18.10.2017

time // 07:27

year // 2017

month // October

week // 42

day // Wednesday

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

Example:

Wed, 18 Oct 2017 07:27:59 +0000

18.10.2017 09:27 // current time in Berlin

2017-10-18 16:27 // Tokyo

2017-10-18 15:27 // Singapore

10/18/2017 3:27 AM // New York


Available for:

Advertising

© 2010 - 2017 FINWICK® UG

We have 42 guests and no members online

enfrdeitptrues