Results 1 to 4 of 4

Thread: java code example set time_zone oracle session

  1. #1
    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.

  2. #2
    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.

  3. #3
    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.

  4. #4
    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)

Similar Threads

  1. help me to understand java code (calendar java code) ?
    By so0oma in forum Software Development
    Replies: 2
    Last Post: 10-01-2011, 12:01 AM
  2. how to connect advanced java with oracle
    By Mast Maula in forum Software Development
    Replies: 5
    Last Post: 05-01-2011, 11:01 AM
  3. Session Sharing Java portlets / PHP
    By Gokul20 in forum Software Development
    Replies: 5
    Last Post: 31-07-2010, 02:00 AM
  4. Java in oracle 9i database
    By Gerri in forum Software Development
    Replies: 4
    Last Post: 03-02-2010, 08:35 PM
  5. Java & Oracle: Passing Date
    By garfield1 in forum Software Development
    Replies: 5
    Last Post: 04-01-2010, 12:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,270,937.86833 seconds with 17 queries