Time field

From EPrints Documentation
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects

Metadata Fields: Boolean - Compound - Multilang - Date - Time - Float - Int - Itemref - Pagerange - Set - Namedset - Subject - Text - Email - Longtext - Name - Url



This field is very similar to date field but allows the inclusion of hours, mintues and seconds. It is used for the various timestamps associated with an eprint record.

Times are always stored in UTC and rendered in the local timezone.

In version 3.0 times must be input and searched in UTC. This is undesirable, but must systems do not require searching down to the hour. This may be addressed in a later version. (developers note: if this is an issue for you, drop us a line).


As for date fields with the following differences...

name default description
min_resolution second One of second/minute/hour/day/month/year. Indicates the smallest unit of measure that must be entered to make a value valid. Eg. if "day" so long as there's a year+month+day the hours,seconds and minutes are optional.
render_res day One of second/minute/hour/day/month/year. If set to "year" then the dates 1998-10-01, 1998-10 and 1998 would all be rendered as "1998". This is not too useful in configuring the field, but can be set as a print option inside citation files. Although it can be handy to store the time right down to the second, you often will just want to render the hours and minutes for day to day use.
render_style long One of short/long.

If "long" then you'll see "8 September 1998 23:12:11 +01:00".

If "short" then value is rendered as "08 Sep 1998 23:12:11".

Required Phrases



fieldname_year SMALLINT, fieldname_month SMALLINT, fieldname_day SMALLINT, 
 fieldname_hour SMALLINT, fieldname_minute SMALLINT, fieldname_second SMALLINT


Similar to date field but of the format "YYYY-MM-DD HH:MM:SS". Parts may be ommited, eg. YYYY-MM-DD HH:MM".


Exactly the same as date fields. In 3.0 there is no way to make finer grained searches than by day.