Re: application displays date off by one day
Date: Tue, 8 Jan 2008 05:38:58 -0800 (PST)
On Jan 7, 10:16 pm, kcu..._at_gmail.com wrote:
> On Jan 7, 12:04 pm, "allen.dar..._at_gmail.com" <allen.dar..._at_gmail.com>
> > On Jan 7, 10:51 am, kcu..._at_gmail.com wrote:
> > > I have an application developed in JDeveloper 10.1.2.1.0 that is
> > > displaying dates incorrectly.
> > > This seems to be related to some Time Zone setting.
> > > If the date is 2006-03-20 00:00:00.0 is displays as 2006-03-19.
> > > If the date is 2006-03-20 01:01:00.0 is displays as 2006-03-20.
> > > Value is stored as a Date.
> > > Any suggestions?
> > > KSC
> > Can you query a table and see what time zone setting you are in?
> From SQL:
> select current_timestamp from dual
> > 2008-1-7 13.40.xx.xxxxxx America/New York
> select dbtimezone from dual
> > EST
> From Java:
> Date = Monday Jan 07 13:40:xx EST 2008
> > at 13:53
> Calendar = java.util.GregorianCalendar
Looks like either the database host time or the client host time is off by ca. 13 minutes (it says 13:40 at 13:53 if I'm reading your output correctly.) Setup the database host to synchronize with some NTP server to be sure its time is always correct. Setup time sync on client host to be sure your time is also correct.
Vladimir M. Zakharychev
N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.com Received on Tue Jan 08 2008 - 07:38:58 CST