X-Original-To: pgsql-docs@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9EDB0475F5F for ; Fri, 11 Apr 2003 16:34:16 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id D491D475EDF for ; Fri, 11 Apr 2003 16:34:14 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3BKYF2L013520; Fri, 11 Apr 2003 16:34:15 -0400 (EDT) To: Curt Sampson Cc: pgsql-docs@postgresql.org Subject: Re: 6.8.5: Location of CURRENT_DATE unclear In-reply-to: References: Comments: In-reply-to Curt Sampson message dated "Thu, 10 Apr 2003 11:44:19 +0900" Date: Fri, 11 Apr 2003 16:34:14 -0400 Message-ID: <13519.1050093254@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.5 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/20 X-Sequence-Number: 1746 Curt Sampson writes: > In table 6-18 the 7.3 documentation, it describes the CURRENT_DATE > function as returning "today's date." Section 6.8.4 mentions > CURRENT_DATE again, but does not describe what location is used to > determine the current date. Does this return the current date as of now, > UTC, or the current date in the local timezone? The latter, as you could easily have found by experiment. regression=# show timezone; TimeZone ---------- EST5EDT (1 row) regression=# select now(), current_date; now | date ------------------------------+------------ 2003-04-11 16:32:59.84755-04 | 2003-04-11 (1 row) regression=# set timezone to 'JST-9'; SET regression=# select now(), current_date; now | date -------------------------------+------------ 2003-04-12 05:33:19.119802+09 | 2003-04-12 (1 row) regards, tom lane