Issue 18237

API event date has 23:00:00 timestamp

Reporter: rdmpage
Assignee: cgendreau
Type: Feedback
Summary: API event date has 23:00:00 timestamp
Priority: Unassessed
Resolution: Fixed
Status: Closed
Created: 2016-02-16 15:05:27.025
Updated: 2016-08-08 15:26:05.718
Resolved: 2016-08-08 15:26:05.593
Description: The occurrence API returns event dates that don't match those displayed in on the web page. For example, gives the recorded date as "Feb 9, 2001 12:00:00 AM by Cooper, W.; Cooper, W." . Leaving aside the obvious false precision ("12:00:00 AM") if I compare this to the API result for the same record I get: "eventDate":"2001-02-08T23:00:00.000+0000

Note the day "08" and the timestamp "T23:00:00.000+0000". the verbatim record is "2001-02-09" so I'm puzzled as to why the API gives one hour before midnight on the previous day.

Why doesn't the API simply return  "2001-02-09" which is what the provider supplies, and has the appropriate level of precision?

I don't know how GBIF stores occurrence dates internally, but ideally (a) only store and display the level of precision supplied in the data, and (b) make web page and API consistent.]]>

Author: cgendreau
Created: 2016-08-08 15:26:05.65
Updated: 2016-08-08 15:26:05.65
The API and the Portal are now returning the same date.
Precision/granularity of the date will be tackled in PF-2355.