zerocrates / OaiPmhRepository

OAI-PMH repository plugin for Omeka
http://omeka.org/codex/Plugins/OaiPmhRepository
GNU General Public License v3.0
3 stars 15 forks source link

Get the true earliest date stamp. #6

Closed Daniel-KM closed 9 years ago

Daniel-KM commented 10 years ago

Hi,

A fix to get earliest date in the repository.

Sincerely,

Daniel Berthereau Infodoc & Knowledge management

zerocrates commented 9 years ago

earliestDatestamp : a UTCdatetime that is the guaranteed lower limit of all datestamps recording changes, modifications, or deletions in the repository. A repository must not use datestamps lower than the one specified by the content of the earliestDatestamp element

The spec only requires this to be a guaranteed time I won't go any earlier than in any exposed timestamp, not that any record has to actually have that timestamp.

Since the applicable timestamps in Omeka are stored in MySQL as timestamp types, the guarantee of "1970 or later" is always correct even if the database is manually edited (timestamp columns can't go back further than 1970). While this could be made more accurate for each specific data set, setting this to a static sufficiently long-ago date is fairly standard practice. For example, DSpace's OAI repository returns "1650-06-26 19:58:25" as its earliest timestamp.

Daniel-KM commented 9 years ago

Hi,

I'm ok, but the French national Library has a stricter interpretation and thinks that earliest datestamp can't be 1970 (and 0000 doesn't exist), but the oldest timestamp (not the oldest publication date or record). So, for me, such a light patch avoids to maintain a fork, but this is not a problem.

Sincerely,

Daniel Berthereau Infodoc & Knowledge management