This file is indexed.

/usr/share/doc/libghc-postgresql-simple-doc/html/Database-PostgreSQL-Simple-Time.html is in libghc-postgresql-simple-doc 0.5.1.2-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Database.PostgreSQL.Simple.Time</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Database-PostgreSQL-Simple-Time.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Database-PostgreSQL-Simple-Time.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">postgresql-simple-0.5.1.2: Mid-Level PostgreSQL client library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) 2012-2015 Leon P Smith</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>Leon P Smith &lt;leon@melding-monads.com&gt;</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Database.PostgreSQL.Simple.Time</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides time types that supports positive and negative
infinity,  as well as some functions for converting to and from strings.</p><p>Also, this module also contains commentary regarding postgresql's timestamp
types,  civil timekeeping in general,  and how it relates to
postgresql-simple. You can read more about PostgreSQL's date and time types
at <a href="http://www.postgresql.org/docs/9.1/static/datatype-datetime.html">http://www.postgresql.org/docs/9.1/static/datatype-datetime.html</a>,
and the IANA time zone database at <a href="https://en.wikipedia.org/wiki/Tz_database">https://en.wikipedia.org/wiki/Tz_database</a>.</p><p>Stack Overflow also has some excellent commentary on time,  if it is a
wiki page or a highly upvoted question and answer.   If the answer regarding
time has not received about a hundred upvotes at least,  then the answer is
almost invariably completely and painfully wrong,  even if it's the chosen
answer or the most highly upvoted answer to a question.</p><p>PostgreSQL's <code>timestamp with time zone</code> (hereafter, <code>timestamptz</code>) can be
converted to Haskell's <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:UTCTime">UTCTime</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> types,
because values of these types represent a self-contained, unambiguous point
in time.  PostgreSQL's <code>timestamp without time zone</code> (hereafter, <code>timestamp</code>)
can be converted to Haskell's <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:LocalTime">LocalTime</a></code>,  because values of these
types are ambiguous by themselves,  and require context to disambiguate.</p><p>While this behavior may be superficially counterintuitive because the
names might suggest otherwise,  this behavior is correct.   In fact,
the &quot;timezone&quot; language in both the postgresql and haskell types would
be better read as &quot;offset (from UTC)&quot;,   thus we have postgresql's
&quot;timestamp with offset&quot;  corresponding to Haskell's &quot;time with the
offset 'zero'&quot;  and Haskell's &quot;time with an offset (that might be
nonzero)&quot;.  Similarly,  postgresql's &quot;timestamp without an offset&quot;
corresponds to Haskell's &quot;local time (without an offset)&quot;.</p><p>It's important to distinguish between an offset, a standard time, and
a time zone.  An offset is simply a difference of a local time from UTC,
such as <code>+00</code>, <code>-05</code>, or <code>+05:30</code>.   A standard time specifies an offset
(which may vary throughout the year, due to daylight savings) that a
region follows,  such as Universal Coordinated Time (UTC), Eastern Standard
Time/Eastern Daylight Time (EST/EDT), or India Standard Time (IST).
And a time zone, much like a standard time, is a function from
timestamps to offsets.</p><p>A time zone is different from a standard time because different regions
inside a standard time can be governed by different civil authorities with
different laws and thus have different histories of civil time.  An IANA
time zone is any region of the world that has had the same history of
civil time since <code>1970-01-01 00:00+00</code>.</p><p>For example, as of today,  both <code>America/New_York</code> and
<code>America/Indiana/Indianapolis</code> are on the EST/EDT time standard,  but
Indiana used to be on Central Standard Time until 1942, and did not observe
daylight savings time (EST only) until 2006.   Thus,  the choice between
these two time zones still matters if you are dealing with timestamps
prior to 2006,  and could become relevant again if (most of) Indiana
moves back to Central Time.  (Of course,  if the Central to Eastern switch
was the only difference,  then these two time zones would be the same in
IANA's eyes,  due to their cutoff date of 1970-01-01.)</p><p>Getting back to practicalities,  PostgreSQL's <code>timestamptz</code> type does not
actually store an offset;  rather, it uses the offset provided to calculate
UTC, and stores the timestamp as UTC.   If an offset is not provided, the
given timestamp is assumed to be a local time for whatever the <code>timezone</code>
variable is set to, and the IANA TZ database is consulted to calculate an
offset from UTC for the time in question.</p><p>Note that while most (local timestamp, time zone) pairs correspond to exactly
one UTC timestamp, some correspond to two UTC timestamps,  while others
correspond to none at all.   The ambiguous case occurs when the civil time
is rolled back,  making a calendar day longer than 24 hours.  In this case,
PostgreSQL silently chooses the second, later possibility.  The inconsistent
case occurs when the civil time is moved forward,  making a calendar day less
than 24 hours.  In this case,  PostgreSQL silently assumes the local time
was read off a clock that had not been moved forward at the prescribed time,
and moves the clock forward for you.   Thus,  converting from local time
to UTC need not be monotonic,  if these inconsistent cases are allowed.</p><p>When retrieving a <code>timestamptz</code>,  the backend looks at the <code>time zone</code>
connection variable and then consults the IANA TZ database to calculate
an offset for the timestamp in the given time zone.</p><p>Note that while some of the information contained in the IANA TZ database
is a bit of a standardized fiction, the conversion from UTC time to a
(local time, offset) pair in a particular time zone is always unambiguous,
and the result can always be unambiguously converted back to UTC.  Thus,
postgresql-simple can interpret such a result as a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code>,
or use the offset to convert back to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:UTCTime">UTCTime</a></code>.</p><p>By contrast, the <code>timestamp</code> type ignores any offsets provided to it,
and never sends back an offset.   Thus,  postgresql-simple equates this
with <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:LocalTime">LocalTime</a></code>,  which has no concept of an offset.  One can
convert between <code>timestamptz</code> and <code>timestamp</code> using the <code>AT TIME ZONE</code>
operator, whose semantics also demonstrates that <code>timestamptz</code> is
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:UTCTime">UTCTime</a></code> whereas <code>timestamp</code> is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:LocalTime">LocalTime</a></code>.</p><p>PostgreSQL's <code>timezone</code> is a per-connection variable that by default is
initialized to <code>'localtime'</code>,  which normally corresponds to the server's
time zone.  However, this default can be modified on the server side for an
entire cluster, or on a per-user or per-database basis.  Moreover, a client
can modify their instance of the variable at any time,  and can apply that
change to the remaining duration of the connection, the current transaction,
or the execution context of a server-side function.  In addition, upon
connection initialization, the libpq client checks for the existence of
the <code>PGTZ</code>  environment variable, and if it exists, modifies <code>timezone</code>
accordingly.</p><p>With a few caveats,  postgresql-simple is designed so that you can both send
and receive timestamps with the server and get a correct result,  no matter
what the <code>timezone</code> setting is.  But it is important to understand the caveats:</p><ol><li>The correctness of server-side computations can depend on the <code>timezone</code>
   setting.  Examples include adding an <code>interval</code> to a <code>timestamptz</code>, or
   type casting between <code>timestamp</code> and <code>timestamptz</code>,  or applying
   the <code>DATE</code> function to a <code>timestamptz</code>.</li><li>The (localtime, offset) pair contained in a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> result
   will depend on the <code>timezone</code> setting,  although the result will always
   represent the same instant in time regardless of the time zone.</li><li>Sending a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:LocalTime">LocalTime</a></code> and interpreting it as a <code>timestamptz</code>
   can be useful,  as it will be converted to UTC via the tz database,
   but correctness will depend on the <code>timezone</code> setting.   You may prefer
   to use an explicit <code>AT TIME ZONE</code> conversion instead, which would avoid
   this contextual dependence.</li></ol><p>Furthermore,  although these following points don't involve the <code>timezone</code>
setting, they are related to the last point above:</p><ol><li>Sending a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:UTCTime">UTCTime</a></code> and interpreting it as a <code>timestamp</code> can
   be useful.  In practice,  the most common context used to disambiguate
   <code>timestamp</code> is that it represents UTC,  and this coding technique will
   work as expected in this situation.</li><li>Sending a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> and interpreting it as a <code>timestamp</code> is
   almost always the wrong thing to do,  as the offset will be ignored and
   discarded.  This is likely to lead to inconsistencies in the database,
   and may lead to partial data loss.</li></ol><p>When dealing with local timestamps that refer to the future,  it is often
useful to store it as a local time in a <code>timestamp</code> column and store the
time zone in a second column.  One reason to do this is so that you can
convert to UTC on the fly as needed, and be protected against future changes
to the TZ database due to changes in local time standards.  In any case,
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> is not suitable for this application, because despite
its name,  it represents an offset and not a time zone.  Time zones can change;
offsets do not.  In reality,  we can't convert a local timestamp that occurs
sufficiently far in the future to UTC, because we don't know how to do it yet.</p><p>There are a few limitations and caveats that one might need to be aware
of with the current implementation when dealing with older timestamps:</p><p>For sufficiently old timestamps in almost all time zones,  the IANA TZ
database specifies offsets from UTC that is not an integral number of
minutes.   This corresponds to local mean time;  that is, astronomical
time in the city that defines the time zone.  Different time zones moved
away from local mean time to a standard time at different points in
history,  so &quot;sufficiently old&quot; depends on the time zone in question.</p><p>Thus, when retrieving a <code>timestamptz</code> postgresql will in some cases
provide seconds in the offset.  For example:</p><pre>$ psql
psql (9.4.5)
Type &quot;help&quot; for help.

lpsmith=&gt; SET timezone TO 'America/New_York';
SET
lpsmith=&gt; VALUES ('1883-11-18 16:59:59+00'::timestamptz),
                 ('1883-11-18 17:00:00+00'::timestamptz);
           column1
------------------------------
 1883-11-18 12:03:57-04:56:02
 1883-11-18 12:00:00-05
(2 rows)
</pre><p>Both of these timestamps can be parsed as a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:UTCTime">UTCTime</a></code> type,
however <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> will fail on the former timestamp.
Because <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time.html#v:ZonedTime">ZonedTime</a></code> assumes that offsets are an integer number
of minutes,  there isn't an particularly good solution here.</p><p>PostgreSQL,  like most software,  uses the proleptic Gregorian calendar
for its date calculations,  extending the Gregorian calendar backwards
in time before its introduction and pretending that the Julian calendar
does not exist.  For most purposes, the adoption of the Gregorian calendar
ranges from <code>1582-10-15</code> to <code>1923-03-01</code>,  depending on location and
sometimes even political allegiances within a single location.</p><p>Timestamps BCE are not supported.  For example, PostgreSQL
will emit &quot;<code>0045-01-01 BC</code>&quot; for the first proleptic Gregorian day of
the year the Roman Empire adopted the Julian Calendar,  but
postgresql-simple does not (yet?) have the ability to either parse or
generate this syntax.   Unfortunately this syntax isn't convenient to
print or especially parse.</p><p>Also, postgresql itself cannot parse or print dates before <code>4714-11-24 BC</code>,
which is the Julian date on the proleptic Gregorian Calendar.   Although
postgresql's timestamp types are perfectly capable of representing timestamps
nearly 300,000 years in the past,  using this would require postgresql-simple
and other client programs to support binary parameters and results.</p><p>Dealing with years BCE is also complicated slightly by the fact that
Haskell's time library has a year &quot;0000&quot;,  which is a convention often
used by astronomers,  while postgresql adopts the more historically
accurate convention that there is no year zero, but rather &quot;1 BCE&quot;
was immediately followed by &quot;1 CE&quot;.</p></div></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Unbounded" class="def">Unbounded</a> a <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#Unbounded" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NegInfinity" class="def">NegInfinity</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Finite" class="def">Finite</a> !a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:PosInfinity" class="def">PosInfinity</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Unbounded" class="caption collapser" onclick="toggleSection('i:Unbounded')">Instances</p><div id="section.i:Unbounded" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a></span> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#line-33" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-FromField.html#t:FromField">FromField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:Date">Date</a></span> <a href="src/Database-PostgreSQL-Simple-FromField.html#line-463" class="link">Source</a></td><td class="doc"><p>date</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-FromField.html#t:FromField">FromField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:ZonedTimestamp">ZonedTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-FromField.html#line-455" class="link">Source</a></td><td class="doc"><p>timestamptz</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-FromField.html#t:FromField">FromField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:UTCTimestamp">UTCTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-FromField.html#line-451" class="link">Source</a></td><td class="doc"><p>timestamptz</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-FromField.html#t:FromField">FromField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:LocalTimestamp">LocalTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-FromField.html#line-459" class="link">Source</a></td><td class="doc"><p>timestamp</p></td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:Date">Date</a></span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-266" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:ZonedTimestamp">ZonedTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-258" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:UTCTimestamp">UTCTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-254" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> <a href="Database-PostgreSQL-Simple-Time.html#t:LocalTimestamp">LocalTimestamp</a></span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-262" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#line-33" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#line-33" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> (<a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#line-42" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> a)</span> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#line-35" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> (<a href="Database-PostgreSQL-Simple-Range.html#t:PGRange">PGRange</a> <a href="Database-PostgreSQL-Simple-Time.html#t:Date">Date</a>)</span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-307" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> (<a href="Database-PostgreSQL-Simple-Range.html#t:PGRange">PGRange</a> <a href="Database-PostgreSQL-Simple-Time.html#t:ZonedTimestamp">ZonedTimestamp</a>)</span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-296" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> (<a href="Database-PostgreSQL-Simple-Range.html#t:PGRange">PGRange</a> <a href="Database-PostgreSQL-Simple-Time.html#t:UTCTimestamp">UTCTimestamp</a>)</span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-292" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Database-PostgreSQL-Simple-ToField.html#t:ToField">ToField</a> (<a href="Database-PostgreSQL-Simple-Range.html#t:PGRange">PGRange</a> <a href="Database-PostgreSQL-Simple-Time.html#t:LocalTimestamp">LocalTimestamp</a>)</span> <a href="src/Database-PostgreSQL-Simple-ToField.html#line-303" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Date" class="def">Date</a> = <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Calendar.html#t:Day">Day</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#Date" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:UTCTimestamp" class="def">UTCTimestamp</a> = <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#UTCTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ZonedTimestamp" class="def">ZonedTimestamp</a> = <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#ZonedTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LocalTimestamp" class="def">LocalTimestamp</a> = <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#LocalTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseDay" class="def">parseDay</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Calendar.html#t:Day">Day</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseDay" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseUTCTime" class="def">parseUTCTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseUTCTime" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseZonedTime" class="def">parseZonedTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseZonedTime" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseLocalTime" class="def">parseLocalTime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseLocalTime" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseTimeOfDay" class="def">parseTimeOfDay</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseTimeOfDay" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseDate" class="def">parseDate</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="Database-PostgreSQL-Simple-Time.html#t:Date">Date</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseDate" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseUTCTimestamp" class="def">parseUTCTimestamp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="Database-PostgreSQL-Simple-Time.html#t:UTCTimestamp">UTCTimestamp</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseUTCTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseZonedTimestamp" class="def">parseZonedTimestamp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="Database-PostgreSQL-Simple-Time.html#t:ZonedTimestamp">ZonedTimestamp</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseZonedTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:parseLocalTimestamp" class="def">parseLocalTimestamp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> <a href="Database-PostgreSQL-Simple-Time.html#t:LocalTimestamp">LocalTimestamp</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#parseLocalTimestamp" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:dayToBuilder" class="def">dayToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Calendar.html#t:Day">Day</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#dayToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:utcTimeToBuilder" class="def">utcTimeToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:UTCTime">UTCTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#utcTimeToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zonedTimeToBuilder" class="def">zonedTimeToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#zonedTimeToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:localTimeToBuilder" class="def">localTimeToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#localTimeToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:timeOfDayToBuilder" class="def">timeOfDayToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#timeOfDayToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:timeZoneToBuilder" class="def">timeZoneToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#timeZoneToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:dateToBuilder" class="def">dateToBuilder</a> :: <a href="Database-PostgreSQL-Simple-Time.html#t:Date">Date</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#dateToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:utcTimestampToBuilder" class="def">utcTimestampToBuilder</a> :: <a href="Database-PostgreSQL-Simple-Time.html#t:UTCTimestamp">UTCTimestamp</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#utcTimestampToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zonedTimestampToBuilder" class="def">zonedTimestampToBuilder</a> :: <a href="Database-PostgreSQL-Simple-Time.html#t:ZonedTimestamp">ZonedTimestamp</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#zonedTimestampToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:localTimestampToBuilder" class="def">localTimestampToBuilder</a> :: <a href="Database-PostgreSQL-Simple-Time.html#t:LocalTimestamp">LocalTimestamp</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#localTimestampToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:unboundedToBuilder" class="def">unboundedToBuilder</a> :: (a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a>) -&gt; <a href="Database-PostgreSQL-Simple-Time.html#t:Unbounded">Unbounded</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#unboundedToBuilder" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:nominalDiffTimeToBuilder" class="def">nominalDiffTimeToBuilder</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/time-1.5.0.1/Data-Time-Clock.html#t:NominalDiffTime">NominalDiffTime</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Builder.html#t:Builder">Builder</a> <a href="src/Database-PostgreSQL-Simple-Time-Implementation.html#nominalDiffTimeToBuilder" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>