git.iko.soy/typeable/postgresql-simple
on master help sign in
Comments
commit7c7c02d6baf5aea8ebcf64b06d9708dc2b3d377f authorLeon P Smith <leon@melding-monads.com> dateSat 2 Jun 2012, 23:52 (14 years ago) parent19e0957
2 files changed+20−12
src/Database/PostgreSQL/Simple/Time.hs+20−3 src/Database/PostgreSQL/Simple/Time/Internal.hs−9
src/Database/PostgreSQL/Simple/Time.hs+20−3
@@ -6,9 +6,26 @@
66-- Maintainer: Leon P Smith <leon@melding-monads.com>
77-- Stability: experimental
88--
9−-- Time types that supports infinities. Also includes new time parsers
10−-- with improved performance over GHC's time package. See
11−-- 'Database.PostgreSQL.Simple.Time.Internal'.
9+-- Time types that supports positive and negative infinity. Also includes
10+-- new time parsers and printers with better performance than GHC's time package.
11+-- The parsers only understand the specific variant of ISO 8601 that PostgreSQL
12+-- emits, and the printers attempt to duplicate this syntax. These likely have
13+-- problems and shortcomings. Some that I know of:
14+--
15+-- 1. Timestamps with time zones before @1883-Nov-18 12:00:00-05@, the moment
16+-- Standard Railway Time went live, cannot be parsed. This is because
17+-- PostgreSQL will emit @1883-11-18 12:03:57-04:56:02@ instead of
18+-- @1883-11-18 11:59:59-05@, and the timezone parser is incomplete.
19+-- Timestamps without time zones do not have this problem.
20+--
21+-- 2. Dates an times surrounding @1582-Feb-24@, the date the Gregorian
22+-- Calendar was introduced, should be investigated for conversion errors.
23+--
24+-- 3. Points in time Before Christ are not also not supported. For example,
25+-- PostgreSQL will emit @0045-01-01 BC@ for a value of a @date@ type.
26+-- This is the year that the Julian Calendar was adopted.
27+--
28+-- However, it should be noted that the old parsers also had these issues.
1229--
1330------------------------------------------------------------------------------
1431
src/Database/PostgreSQL/Simple/Time/Internal.hs−9
@@ -6,15 +6,6 @@
66-- Maintainer: Leon P Smith <leon@melding-monads.com>
77-- Stability: experimental
88--
9−-- Time parsers with improved performance over GHC's time package. They
10−-- only understand the specific variant of ISO 8601 that PostgreSQL emits.
11−-- These parsers likely have problems and shortcomings. Some that I know of:
12−--
13−-- 1. Timestamps with time zones before 1883-Nov-18 are not supported, due to
14−-- incomplete time zone parsing.
15−--
16−-- 2. Time Before Christ is not also not supported.
17−--
189------------------------------------------------------------------------------
1910
2011{-# LANGUAGE DeriveDataTypeable #-}