You are now viewing the documentation of eZ Publish legacy (4.x series and the legacy "stack" in 5.x). For 5.x versions this documentation must be complemented with the latest, more current documentation available at confluence.ez.no. Happy learning!

Date and time

Summary

Validates and stores a date and a time value.

Properties

NameInternal nameSearchableInformation collector
Date and time ezdatetime Yes. No.

Description

This datatype allows the validation, storage and retrieval of a date/time value. It is capable of storing a date/time consisting of a year, month, day, hour and minute value. The following screenshot shows the class attribute edit interface for this datatype.

Class attribute edit interface for the "Datetime" datatype.

Class attribute edit interface for the "Datetime" datatype.

Default value

The "Default value" parameter can be used to control the initial value of an attribute using this datatype when a new object is created. There are three options:

  • Empty
  • Current datetime
  • Adjusted current datetime

The default setting is "Empty", which means that when a new object is created, the attribute using this datatype will be empty. If the "Current datetime" option is used, the current date and time will be set. If the "Adjusted datetime" is used, an adjusted value of the current date and time will be set. How much the current date and time should be adjusted must be specified using the fields within the "Current datetime adjusted by" group.

Current datetime adjusted by

The fields within this group can be used to specify the desired date/time adjustment when the ("Adjusted current datetime") option is used. Both positive and negative numerical values are allowed. If the values given in the example above are used and an object is created at 00:00 on the first of January 2005, the initial value of the attribute will be set to 04:05, third of February, 2006.

Object attribute edit interface

The following screenshot shows the object attribute interface for this datatype.

Object attribute edit interface for the "Date and time" datatype.

Object attribute edit interface for the "Date and time" datatype.

Raw output

The ".content" of an ezcontentobjectattribute object using this datatype returns an ezdatetime object.

Balazs Halasy (21/02/2005 3:36 pm)

Balazs Halasy (29/04/2005 1:04 pm)


Comments

There are no comments.