Bug #3096
closedDate data type (domain) need be handled correctly
0%
Description
Currently, Date data type (domain) in EML document is treated as string in database system. This will cause some limitation in query operation to date data type.
Updated by ben leinfelder over 16 years ago
Tried the first step which uses ISO standard format for dates in the EML metadata/data. postgres is pretty flexible when it comes to date formats, but I'd like to get it so that the formatString in the EML is used to set the format string that the DB table accepts. I think this is very doable...just have to figure out how.
and also implement it for HSQL database adaptor
Updated by ben leinfelder over 16 years ago
implemented datetime handling in both the Postgres and HSQLDB adaptors.
Uses the format string supplied in the EML for the attribute.
For the Postgres adaptor, the mapping of the format strings is straightforward, but for hsql I'm using the SimpleDateFormat to help parse the string into a date and the Java conventions are a tad different than ISO 8601 (what we a re using in EML). I've included some manual conversions where there is no ambiguity (ie. uppercase Y to lowercase y). It is possible that we might encounter more discrepancies as more people use this feature.
This change also means that the format string becomes very important - there is case sensitivity lurking here and we cannot assume that "mm" (minute) really means "MM" (month). I'm sure there are many datapackages that have imperfect format strings.
Updated by ben leinfelder almost 15 years ago
as a bug this is resolved - just a final note that format strings are crucial for datetime parsing to be accurate.