Skip site navigation (1) Skip section navigation (2)

Re: 6.8.5: Location of CURRENT_DATE unclear

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Curt Sampson <cjs(at)cynic(dot)net>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: 6.8.5: Location of CURRENT_DATE unclear
Date: 2003-04-11 20:34:14
Message-ID: 13519.1050093254@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-docs
Curt Sampson <cjs(at)cynic(dot)net> 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


In response to

Responses

pgsql-docs by date

Next:From: Juraj FedelDate: 2003-04-11 22:43:40
Subject: Re: [ADMIN] PLEASE HELP ME URGENT about choosing only the ones
Previous:From: Tim EllisDate: 2003-04-10 18:13:05
Subject: Re: PLEASE HELP ME URGENT about choosing only the ones

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group