From 261026575d4b38fd7a39a43c53064de464695f0e Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 22 Jul 2005 21:16:15 +0000 Subject: Fix AT TIME ZONE for timestamps without time zones: test=> select ('2005-07-20 00:00:00'::timestamp without time zone) at time zone 'Europe/Paris'; timezone ------------------------ 2005-07-19 22:00:00-04 Udpate documentation. --- doc/src/sgml/func.sgml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 43f720ae10f..59813e16f16 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -5693,7 +5693,7 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); timestamp without time zone AT TIME ZONE zone timestamp with time zone - Convert local time in given time zone to UTC + Treat given timestamp without time zone as located in the specified time zone @@ -5701,7 +5701,7 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); timestamp with time zone AT TIME ZONE zone timestamp without time zone - Convert UTC to local time in given time zone + Convert given timestamp with time zone to the new time zone @@ -5709,7 +5709,7 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); time with time zone AT TIME ZONE zone time with time zone - Convert local time across time zones + Convert given time with time zone to the new time zone @@ -5720,7 +5720,8 @@ SELECT date_trunc('year', TIMESTAMP '2001-02-16 20:38:40'); specified either as a text string (e.g., 'PST') or as an interval (e.g., INTERVAL '-08:00'). In the text case, the available zone names are those shown in - . + . The time zone can + also be implied using the default time zone for that session. @@ -5732,10 +5733,9 @@ SELECT TIMESTAMP '2001-02-16 20:38:40' AT TIME ZONE 'MST'; SELECT TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-05' AT TIME ZONE 'MST'; Result: 2001-02-16 18:38:40 - The first example takes a zone-less time stamp and interprets it as MST time - (UTC-7) to produce a UTC time stamp, which is then rotated to PST (UTC-8) - for display. The second example takes a time stamp specified in EST - (UTC-5) and converts it to local time in MST (UTC-7). + The first example takes a time stamp without time zone and interprets it as MST time + (UTC-7), which is then converted to PST (UTC-8) for display. The second example takes + a time stamp specified in EST (UTC-5) and converts it to local time in MST (UTC-7). -- cgit v1.2.3