ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

maketime

Summary

Generates the UNIX timestamp of a given date/time.

Usage

maketime( [hour [, minute [, second [, month [, day [, year [, dst ] ] ] ] ] ] ] )

Parameters

NameTypeDescriptionRequired
hour integer Hour of the day. No.
minute integer Minute of the hour. No.
second integer Second of the minute. No.
month integer Month of the year. No.
day integer Day of the month. No.
year integer The year. No.
dst integer Daylight savings (on/off). No.

Returns

A UNIX timestamp (an integer).

Description

This operator returns the UNIX timestamp corresponding to the provided parameters. The parameters may be left out in order from right to left. Parameters that are omitted will be set to the current value according to the local date and time. The "dst" parameter can be set to 1 if the time is during daylight savings time (DST), 0 if it is not, or -1 (the default) if it is unknown whether the time is within daylight savings time or not (the system will try to figure it out). If no parameters are given, the operator will return the current timestamp.

Examples

Example 1

{maketime( 1, 2, 3, 4, 5, 2004 )}

The following output will be produced: "1081119723" - which is the UNIX timestamp for "01:02:03, 5th of April, 2004".

Balazs Halasy (21/03/2005 9:32 am)

Julia Shymova (26/04/2007 11:41 am)

Balazs Halasy, Julia Shymova


Comments

There are no comments.