Oracle and Dates

From: Roedy Green (look-at-the-website_at_mindprod.com)
Date: 03/25/04


Date: Wed, 24 Mar 2004 23:40:28 GMT

I say this about Oracle and dates in the Java glossary. Somebody
wrote and said it was not true. I did not generate this from first
hand experience. What is the truth?

Oracle SQL databases expect dates stored to be presented in UTC, yet
when you retrieve them they automatically convert to local time. This
is not what you want. A servlet's local time has no relation to the
final client's local time. Store dates as longs or ints to avoid
Oracle's foolish meddling.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Relevant Pages