This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

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 10:32 am)

Julia Shymova (26/04/2007 1:36 pm)

Balazs Halasy, Julia Shymova


Comments

There are no comments.