|
From: Colin P. A. <co...@co...> - 2009-09-30 07:48:00
|
>>>>> "Justin" == Justin Bailey <jgb...@gm...> writes:
Justin> As far as I can tell, this is an issue with HDBC's
Justin> Convertible class/package more than haskelldb. The
Justin> instance of Convertible for the time type
Justin> (Data.Time.LocalTime.LocalTime.ZonedTime) is apparently
Justin> trying to use the format string "%Y-%m-%d %T%Q %z" to
Justin> parse the data. Notice %z - that is a time zone
Justin> specifier, and it does not show up in the example value
Justin> ("2009-09-28 11:48:37").
Justin> If you can manage to get your own instance of Convertible
Justin> defined, you should be able to define your own format
Justin> string to parse the data. Alternatively, if you can get
Justin> SqlLite to include timezone information you can probably
Justin> get the value to parse.
I think it's a problem with the way haskelldb defines columns for
CalendarTimeT.
The reason I say this, is because I tried switching from sqlite3 to
postgresql. It doesn't work there either. But this time, instead of
the column being of type "timestamp", it is of type "timestamp without
time zone", which is clearly wrong, as CalendarTime includes timezone
information.
I can probably bodge this with an SQL ALTER TABLE ... ALTER COLUMN
.. statement to make this "timestamp with time zone", but I think
haskelldb should be generating the correct types anyway (for sqlite3
this may not be possible).
--
Colin Adams
Preston Lancashire
|