Zum Hauptinhalt springen

Format timestamp

XML
<date:format var="var" format="c" timezone="(system time zone)">
date
</date:format>

<date:format /> returns the formatted representation of a timestamp according to a given PHP-compatible format.

Timestamps are based on Unix time, defined as the number of seconds elapsed since midnight proleptic Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

Attributes

NameTypeDescriptionDefined By
varvarResult variable name date:format
formatstringFormat date:format
timezonestringTime zone date:format

Results

BindingTypePredicate
varstringN/A

Examples

XML
<output>
<date:format format="Y-m-d">946684800</date:format>
</output>

<!-- 2000-01-01 -->