Jump to content

Timestamp field

From EPrints Documentation


Description[edit]

This field is almost exactly the same as a Time field except it has the default value of the current time. So this will be implicitly said if another value is not specified. Therefore, this type of field is useful to capture the exact time a data object is created.

Inheritance[edit]

Additional Properties[edit]

As for Time fields.

Required Phrases[edit]

No additional phrases beyond those required for Time fields.

Database[edit]

Timestamp fields are stored in the database as

fieldname_year SMALLINT(6)
fieldname_month SMALLINT(6)
fieldname_day SMALLINT(6)
fieldname_hour SMALLINT(6)
fieldname_minute SMALLINT(6)
fieldname_second SMALLINT(6)

API[edit]

See API page.

Examples[edit]

Most basic example.

{
    name => 'created'
    type => 'timestamp',
}