Re: application displays date off by one day

From: <kcurry_at_gmail.com>
Date: Tue, 8 Jan 2008 06:26:11 -0800 (PST)
Message-ID: <c493142e-5b6f-49df-a8fa-6479ce1c151a@41g2000hsy.googlegroups.com>


On Jan 8, 8:38 am, "Vladimir M. Zakharychev" <vladimir.zakharyc..._at_gmail.com> wrote:
> 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>
> > wrote:
>
> > > 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
> > [
> > time=1199732965985,
> > areFieldsSet=true,
> > lenient=true,
> > zone=sun.util.calendar.ZineInfo[
>
> > id="America/New_York",
> > offset=-18000000,
> > dstSavings=3600000,
> > useDaylight=true,
> > transition=235,
> > lastRule=java.tuil.SimpleTimeZone[
> > id="America/New_York",
> > offset=-18000000,
> > dstSavings=3600000,
> > useDaylight=true,
> > startYear=0,
> > startMode=3,
> > startMonth=3,
> > startDay=1,
> > startDayofWeek=1,
> > startTime=7200000,
> > startTimeMode=0,
> > endMode=2,
> > endMonth=9,
> > endDay=1,
> > endDayofWeek=1,
> > endTime=7200000,
> > endTimeMode=0,}},
> > firstDayofWeek=1,
> > minimalDaysinFirstWeek=1,
> > ERA=1,
> > YEAR=2008,
> > MONTH=0
> > WEEK_OF_YEAR=2,
> > WEEK_OF_MONTH=2,
> > DAY_OF_MONTH=7,
> > DAY_OF_YEAR=7,
> > DAY_OF_WEEK=2,
> > DAY_OF_WEEK_IN_MONTH=1,
> > AM_PM=1,
> > HOUR=1,
> > HOUR_OF_DAY=13,
> > MINUTES=52,
> > SECONDS=45,
> > MILLISECONDS=985,
> > ZONE_OFFSET=-18000000,
> > DST_OFFSET=0
> > ]
>
> 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.
>
> Hth,
>    Vladimir M. Zakharychev
>    N-Networks, makers of Dynamic PSP(tm)
>    http://www.dynamicpsp.com- Hide quoted text -
>
> - Show quoted text -

The time differences are a result of when I captured the information , not differeneces in host times.
The host times are in sync. That is what I attempted, albeit not very well, to capture with the "> > > at 13:53 " label.

KSC Received on Tue Jan 08 2008 - 08:26:11 CST

Original text of this message