diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 11ccc2a9a60215e79d50e391ca200b2e962c9720..f06c04c697f4dacdb447e5309c3cfee1a2100db6 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1,5 +1,5 @@ @@ -1248,29 +1248,34 @@ January 8 04:05:06 1999 PST Although the date type does not have an associated time zone, the time type can or does. + Time zones in the real world can have no meaning unless + associated with a date as well as a time + since the offset may vary through the year with daylight savings + time boundaries. The default time zone is specified as a constant integer offset - from GMT/UTC. + from GMT/UTC. It is not possible to adapt to daylight savings + time when doing date/time arithmetic across + DST boundaries. - - Time zones in the real world can have no meaning unless - associated with a date as well as a time - since the offset may vary through the year with daylight savings - time boundaries. - To address these difficulties, Postgres - associates time zones only with date and time - types which contain both date and time, - and assumes local time for any type containing only + To address these difficulties, we recommend using date/time + types which contain both date and time when using time zones. We + recommend not using the SQL92 type TIME + WITH TIME ZONE (though it is supported by + Postgres for legacy applications and + for compatibility with other RDBMS implementations). + Postgres + assumes local time for any type containing only date or time. Further, time zone support is derived from the underlying operating system time zone capabilities, and hence can handle daylight savings time @@ -1286,8 +1291,8 @@ January 8 04:05:06 1999 PST - All dates and times are stored internally in Universal UTC, - alternately known as Greenwich Mean Time (GMT). + All dates and times are stored internally in UTC, + traditionally known as Greenwich Mean Time (GMT). Times are converted to local time on the database server before being sent to the client frontend, hence by default are in the server time zone. @@ -1299,7 +1304,7 @@ January 8 04:05:06 1999 PST - The TZ environment variable used by the backend directly + The TZ environment variable is used by the backend directly on postmaster start-up as the default time zone. @@ -1315,15 +1320,27 @@ January 8 04:05:06 1999 PST sets the time zone for the session. + + + The SQL92 qualifier on + +timestamp AT TIME ZONE 'zone' + + where zone can be specified as a + text time zone (e.g. 'PST') or as an + interval (e.g. INTERVAL '-08:00'). + + - If an invalid time zone is specified, - the time zone becomes GMT (on most systems anyway). - - - + + + If an invalid time zone is specified, + the time zone becomes GMT (on most systems anyway). + + @@ -1889,6 +1906,10 @@ January 8 04:05:06 1999 PST + + + + <type>inet</type> The essential difference between inet and cidr