Date difference between Java and db2

Hello,

I am quite puzzled. I have the following environment:

-iseries DB2

-Jdk 1.5

-Hibernate 3 (jpa)

-Tomcat 5.5

When I have "31st December 2006" in the database, the webapp displays "30th December 2006" and so on.

I don't understand this one-day difference?

Does anyone has some clue of why I get this?

Thanks in advance,

Julien.

PS: The fields are typed java.util.Date

[445 byte] By [balteoa] at [2007-11-27 7:54:36]
# 1

> When I have "31st December 2006" in the database, the

> webapp displays "30th December 2006" and so on.

>

> I don't understand this one-day difference?

>

> Does anyone has some clue of why I get this?

Because there is a lot of code between 'database' and 'webapp displays'.

That of course also assumes that you really do have the date that you think in the database. (Not knowing db2 I can only note that most other databases do not store dates. They store timestampes, which is different.)

jschella at 2007-7-12 19:35:54 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
timezone problem. will be sorted through the use of calendar.J.
balteoa at 2007-7-12 19:35:54 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...