Re: 6.8.5: Location of CURRENT_DATE unclear

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: 6.8.5: Location of CURRENT_DATE unclear
Дата
Msg-id
13519.1050093254@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
6.8.5: Location of CURRENT_DATE unclear Curt Sampson <cjs@cynic.net>
Re: 6.8.5: Location of CURRENT_DATE unclear Tom Lane <tgl@sss.pgh.pa.us>
Re: 6.8.5: Location of CURRENT_DATE unclear Curt Sampson <cjs@cynic.net>
Re: 6.8.5: Location of CURRENT_DATE unclear Tom Lane <tgl@sss.pgh.pa.us>
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

В списке pgsql-docs по дате отправления
От: Curt Sampson
Дата:
От: Tom Lane
Дата:
FAQ