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

Home -> Community -> Usenet -> c.d.o.misc -> Re: loadjava

Re: loadjava

From: Nick Taylor <ntwysiwyg_at_dataskill.co.uk>
Date: Fri, 31 Aug 2001 16:10:16 GMT
Message-ID: <3B8FB6F1.8DABB5D@dataskill.co.uk>


Prateek wrote:
>
> Hi everybody,
>
> I am using the following function to return the time in milliseconds.
>
> public static String getTimestamp()
> {
> return (new
> Timestamp(System.currentTimeMillis())).toString();
> }
>
> When using this function in oracle( using loadjava) , i am getting the
> time in milliseconds but that is GMT and not the system time. What
> could be the source of error.
>

Hi

I think you'll find this is a Java thing. Dates and Times are a pain in the proverbial. One option is to get your date/time from Oracle.

Failing that you need to look at the java.util.Calendar class so that you can get the time in your locale.

HTH Nick

-- 
Nick Taylor
Say No to Spammers - What You See Isn't What You Get to Email Me
Received on Fri Aug 31 2001 - 11:10:16 CDT

Original text of this message

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