JDBC date problem

Поиск
Список
Период
Сортировка
От Aleksey Demakov
Тема JDBC date problem
Дата
Msg-id 87u315m3ip.fsf@avd.garsib.ru
обсуждение исходный текст
Ответы Re: JDBC date problem
Re: [INTERFACES] JDBC date problem
Список pgsql-interfaces
Can you believe me?

I have a table with a column which is to store the dates each row was
created. I fill it with the line:

    insert_stmt.setDate(2, new Date (System.currentTimeMillis ()));

And every day I insert a new row I can see that I did it tomorrow!

I have found that in the method PreparedStatement.setDate() the date
argument is intentionally incremented by one. The comments there say
that it's to compensate broken SimpleDateFormat. Apparently, my
SimpleDateFormat is ok (JDK 1.1.7 for win95/nt and jdk1.1.5 for freebsd).

Aleksey

--
Aleksey Demakov
avd@gcom.ru

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

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] applet
Следующее
От: Andrea Antibo
Дата:
Сообщение: Re: [INTERFACES] applet