srvarey / gbif-occurrencestore

Automatically exported from code.google.com/p/gbif-occurrencestore
0 stars 0 forks source link

Date parsing not working properly #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The DateParsingUDF is effectively doing the same as the following:

// Y,M,D
DateParseUtils.parse("101", "6", "8").getPayload().getYear();

DateParseUtils.parse("101", "6", "8").getPayload() :
Tue Jun 08 00:00:00 CET 101

But
DateParseUtils.parse("101", "6", "8").getPayload().getYear():
-1799

The Year in this instance is 101 (occurrence record 251921666 does indeed have 
this).  Whether this is something that we want to accept is not is to be 
decided, but this blows Mysql as it wants year in the range of 0-today.

Original issue reported on code.google.com by timrobertson100 on 17 Apr 2011 at 6:02

GoogleCodeExporter commented 9 years ago
See r493 which looks like it would address this (looking at Javadocs)

Original comment by timrobertson100 on 17 Apr 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Confirmed.  
select min(year) from tim_rollover_portal_occurrence_record
=> 101

Original comment by timrobertson100 on 18 Apr 2011 at 6:22