Search Postgresql Archives

Re: Daylight saving time question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Bayless Kirtley" <bkirt@xxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux