Re: Two millisecond timestamp offset

Поиск
Список
Период
Сортировка
От Adrian Cox
Тема Re: Two millisecond timestamp offset
Дата
Msg-id 1126278205.3069.102.camel@localhost
обсуждение исходный текст
Ответ на Re: Two millisecond timestamp offset  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
On Sat, 2005-09-10 at 02:25 +1200, Oliver Jowett wrote:
> The JDBC driver will use the JVM's default timezone to format dates
> unless you explicitly pass a Calendar to setTimestamp() etc, so if that
> timezone is mysteriously 2ms out then it'd explain the strange behaviour
> you see.

Thanks for the clue. There was an error in the code that built the
shared SimpleTimeZone object used for all the date calculations. It was
cut and pasted in from some broken reference code:

new SimpleTimeZone(SimpleTimeZone.UTC_TIME, "UTC");

The value of SimpleTimeZone.UTC_TIME is actually 2, leading to a
mysterious two millisecond offset.

--
Adrian Cox <adrian@humboldt.co.uk>


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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Two millisecond timestamp offset
Следующее
От: Vadim Nasardinov
Дата:
Сообщение: Re: Two millisecond timestamp offset