Re: Retrieve the server's time zone
От | David G. Johnston |
---|---|
Тема | Re: Retrieve the server's time zone |
Дата | |
Msg-id | CAKFQuwbPDsRjd09-J3_Me0R8__NJKD5Mu20zdu=SniDONF734w@mail.gmail.com обсуждение исходный текст |
Ответ на | Retrieve the server's time zone (Thomas Kellerer <spam_eater@gmx.net>) |
Список | pgsql-jdbc |
Hello,
it seems the JDBC driver (or Java?) makes it impossible to retrieve the server's time zone.
Apparently the driver changes the timezone setting so that it can't be reset to the original from the server.
Yes, this is the case. No, in the current code there is no means to prevent it.
psql doesn't provide object instantiation on the results being passed back from the server: all it does is print stuff to the screen. That JDBC and psql different in their behavior with respect to timestamps/dates is unsurprising in that light. I don't know how libpq-based C (or other) language programs operate within this area but that would be the proper API to compare JDBC to.
As a work-around have your application require psql on the client machine and shell out to it. Or hack the driver - though using your timezone-less connection for anything other than finding out the server timezone is probably something you'd want to avoid.
David J.
В списке pgsql-jdbc по дате отправления: