Re: Daylight saving time question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Daylight saving time question
Дата
Msg-id 3656.1242667589@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Daylight saving time question  ("Bayless Kirtley" <bkirt@cox.net>)
Список pgsql-general
"Bayless Kirtley" <bkirt@cox.net> writes:
> For some reason I can't seem to make it work. I have tried setting the
> timezone
> in postgresql.conf as "timezone = 'America/Chicago'" and "timezone =
> 'CST6CDT'"
> both of which still returned one hour behind. I also tried both of your
> suggestions
> as SQL statements right after establishing a database connection and still
> get the
> same wrong time.

> I have a Java application on Windows XP PRO and the way I am getting the
> time is "Select CURRENT_TIME". Is there something I am missing or is there
> another way I should be getting the time?

Are you sure the system's time is actually set correctly on the server
machine?  Seems like confusion between standard and daylight time in
setting the server's clock might be the underlying issue here.

Another theory is that the database is perfectly fine but there's
something wacko happening on the Java side.  Have you tried running
"select current_time" from some other application, like psql?  (In
that connection I note that "select current_time" only gives time of
day not a full timestamp, so I'd not exactly be surprised if it does
confuse Java.  "select current_timestamp" produces a much less ambiguous
result.)

            regards, tom lane

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: Need help
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Daylight saving time question