Re: LOCALTIMESTAMP has wrong time zone

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LOCALTIMESTAMP has wrong time zone
Дата
Msg-id 1430.1298589827@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LOCALTIMESTAMP has wrong time zone  ("Jonathan Brinkman" <JB@BlackSkyTech.com>)
Список pgsql-bugs
"Jonathan Brinkman" <JB@BlackSkyTech.com> writes:
> postgres@Cloud-DB1:~$ psql beta_cms_main -c "show timezone;"
>  TimeZone
> ----------
>  EST
> (1 row)

Hmmm ... you do realize that that setting will result in EST (GMT-5)
all year round?  It's more likely that you want America/New_York.
That's not your immediate problem, though it might be a problem come
daylight savings time.

> postgres@Cloud-DB1:~$ psql beta_cms_main -c "select now();"
>               now
> -------------------------------
>  2011-02-24 17:42:40.023498-05
> (1 row)

> postgres@Cloud-DB1:~$ psql beta_cms_main -c "select localtimestamp;"
>          timestamp
> ----------------------------
>  2011-02-24 17:42:40.078052
> (1 row)

> All looks correct to me!

Well, that shows that you're getting the correct answer for
localtimestamp in psql, so if your application is getting different
answers, then you need to look into what it is that your application
is doing differently.  Possibly you have some other value of timezone in
force in the application's sessions, or there's some conversion going
on in the client that you haven't told us about.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: LOCALTIMESTAMP has wrong time zone
Следующее
От: "Jonathan Brinkman"
Дата:
Сообщение: Re: LOCALTIMESTAMP has wrong time zone