Date data type (domain) need be handled correctly
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.
#1 Updated by ben leinfelder almost 14 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
#2 Updated by ben leinfelder almost 14 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.