| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера