Re: Timestamp Summary
| От | emergency.shower@gmail.com |
|---|---|
| Тема | Re: Timestamp Summary |
| Дата | |
| Msg-id | bdf1a09805072515515f30d261@mail.gmail.com обсуждение исходный текст |
| Ответ на | Timestamp Summary (Christian Cryder <c.s.cryder@gmail.com>) |
| Список | pgsql-jdbc |
On 7/25/05, Christian Cryder <c.s.cryder@gmail.com> wrote: > [...] > This piece of code only needs to get executed when the connection is > first opened to the DB, and from that point on it will ensure that the > db is in functionally the same timezone as the server (taking DST > on/off into account as well). In other words, if my client is running > in MST w/ DST turned off, the server will be configured to etc/gmt+7, > and any dates I insert will be left untouched. > > That make sense? Hi Christian, Besides setTimestamp(int, Timestamp) and getTimestamp(int) we have the more general methods setTimestamp(int, Timestamp, Calendar) and getTimestamp(int, Calendar). If I understand the specs correctly, calls to the methods without a Calendar parameter should be equivalent to the call to the other methods with a Calendar that has time zone TimeZone.getDefault(). From this it follows that modifying the VM's default time zone is a non-solution. Moreover in my opinion the database server's time zone should be ignored by any client (application and JDBC driver) code. Regards, Alex
В списке pgsql-jdbc по дате отправления: