Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 29-07-2009
Member
 
Join Date: Oct 2008
Posts: 105
java code example set time_zone oracle session

I have oracle 9.2g as a database. I have created one table which has a column datataype as TIMESTAMP(6) WITH LOCAL TIME ZONE. And how to specify time zones are specified using time-zone displacements but while doing this rs.getString() or rs.getTimestamp() i get error and it was too lengthy, i don't copy pasted that, but what may be the problem, does anyone come across such problem before.
Reply With Quote
  #2  
Old 29-07-2009
Member
 
Join Date: Jan 2009
Posts: 140
Re: java code example set time_zone oracle session

The time zone set for your database session is the session time zone. You can either qualify it as a displacement from GMT/UTC in the format of 'hh:mm' or you can specify it as a name that has an entry in the V$TIMEZONE table. By default, the session time zone is the same as the database time zone. Looking into it I need to specify the Session Time Zone as part of the Oracle JDBC Connection properties.
Reply With Quote
  #3  
Old 29-07-2009
Member
 
Join Date: Jan 2009
Posts: 99
Re: java code example set time_zone oracle session

The database time zone is set by the TIME_ZONE database parameter. The setting of the TIME_ZONE parameter is in init.ora or spfile.ora file. Listing 1 shows the SQL I used to display the valid time zone name in the Mountain Standard Time Zone. Before accessing TIMESTAMP WITH LOCAL TIME ZONE data, call the OracleConnection.setSessionTimeZone.
Reply With Quote
  #4  
Old 29-07-2009
Member
 
Join Date: Feb 2009
Posts: 105
Re: java code example set time_zone oracle session

In particular, Oracle has added the "WITH TIME ZONE" and the "WITH LOCAL TIME ZONE" to the TIMESTAMP datatype. The time zone for the database is the database time zone. Setting the session time zone doesn't change the database time zone. For example, the following statement sets the local time zone to Pacific Standard Time (PST)
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "java code example set time_zone oracle session"
Thread Thread Starter Forum Replies Last Post
help me to understand java code (calendar java code) ? so0oma Software Development 2 10-01-2011 12:01 AM
how to connect advanced java with oracle Mast Maula Software Development 5 05-01-2011 11:01 AM
Session Sharing Java portlets / PHP Gokul20 Software Development 5 31-07-2010 02:00 AM
Java in oracle 9i database Gerri Software Development 4 03-02-2010 08:35 PM
Java & Oracle: Passing Date garfield1 Software Development 5 04-01-2010 12:30 PM


All times are GMT +5.5. The time now is 03:27 AM.