Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: jobs and timestamps

Re: jobs and timestamps

From: Vince <vinnyop_at_yahoo.com>
Date: Mon, 04 Jun 2007 09:37:20 -0700
Message-ID: <1180975040.813272.308880@d30g2000prg.googlegroups.com>


On Jun 4, 8:49 am, Vince <vinn..._at_yahoo.com> wrote:
> Hello all,
> My apologies if this message comes through twice. I am posting via
> Google and it was not apparent if my initial post was submitted. I am
> reconstructing the message since it was lost.
>
> 10.2.0.1.0/RHEL 4
>
> I have a Java SP which figures out which files are in a specified
> directory and loads the information into a global temp table which is
> then processed by the PL/SQL procedure calling it. The Java SP reads
> the files in the directory and then includes other file attributes,
> such as the modified date/time from the OS:
>
> Timestamp modDate = new Timestamp( pFile.lastModified() );
>
> This procedures behaves as expected when I run the SP from SQL as the
> schema owner. However, when I run the exact same code via user/
> dba_jobs, I get 7 hours added to the time. 7 hours is my current
> offset from UTC/GMT. I confimed that when the job runs it is running
> as the schema owner, so I am not sure why it behaves differently.
>
> I have searched the docs for a setting that would control how
> timestamps/timezones behave within a scheduled job, but could not find
> it. I looked at the new(er) scheduler documentation to see if it was
> mentioned there, but again, could not find it. I know it must be
> there, but I must be looking in the wrong place.
>
> What do I need to change to get the desired output to consider the
> timezone settings being utilised withing a SQL window/environment?
>
> Thanks,
> Vince

I found that I was seaching for the wrong thing.

For using dba_jobs one must alter the session with the timezone information.

For the newer scheduler, it is a built in attribute: default_timezone.

Vince Received on Mon Jun 04 2007 - 11:37:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US