Hello,

The _parse() function of date/format.rb does not handle fractions of
seconds.  Eg, the string

2004-02-12 12:23:45.581297-07

causes the parser to miss the timezone offset.  Postgresql returns
timestamp columns like this, thus breaking ruby-dbi.

A simple change to the regex can fix this:

--- date/format.rb.orig      2004-02-24 12:07:42.000000000 -0800
+++ date/format.rb   2004-02-24 12:03:12.000000000 -0800
@@ -236,7 +236,7 @@ class Date

      # time
      if str.sub!(
-               /(\d+):(\d+)(?::(\d+))?
+               /(\d+):(\d+)(?::(\d+)(?:\.\d+)?)?
                  (?:
                    \s*
                    ([ap])(?:m\b|\.m\.)

Would someone please consider applying this fix?

Thanks,

Brad Hilton
VPOP Technologies, Inc.
bhilton / vpop.net