Results 1 to 3 of 3

Thread: Setting Time Zone in oracle database

  1. #1
    ThompsonHarris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    255
    Rep Power
    3

    Default Setting Time Zone in oracle database

    I want to change the Time stamp of database? It is possible or not? The oracle shows me this GMT -04:00 time zone. After the implementation of Time zone statement it gives me like:

    SQL> select systimestamp from test;

    SYSTIMESTAMP
    ---------------------------------------------------------------------------
    12-Jan-09 12.58.29.906000 PM -04:00

    How many time zone are being used in prediction database.

  2. #2
    GonzalezBrown is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    3

    Default

    The core of time zones is recognized by the database time zones. You can view the chosen time zone using following statement:

    SQL> select DBTIMEZONE from test;
    DBTIME
    ------
    -07:00

    If you should to change the database time zone, you can use ALTER statement to alter the time zone value using recommended command :

    SQL> ALTER database SET TIME_ZONE = 'India’;
    Database altered.

  3. #3
    LewisClark is offline Senior Member
    Join Date
    Dec 2009
    Posts
    260
    Rep Power
    3

    Default

    TIMESTAMP data type is Oracle's great new hope which does not keep only time information but also fractional seconds is viewed by this data type.
    The following code explains you the shared functionality of TIMESTAMP with TIMEZONE.

    Code:
    SQL> select dbtimezone,sessiontimezone from dual;
    DBTIMEZONE SESSIONTIMEZONE
    ---------- ----------------
    -07:00     -07:00
    SQL> insert into date_table values (SYSTIMESTAMP,SYSTIMESTAMP);
    1 row created.
    SQL> alter session set time_zone='-12:00';
    Session altered. 
    SQL> select dbtimezone,sessiontimezone from dual;
    DBTIMEZONE SESSIONTIMEZONE
    ---------- ----------------
    -12:00     -04:00
    
    SQL> insert into date_table values (LOCALTIMESTAMP,LOCALTIMESTAMP );
    1 row created.
    SQL> select time_stamp_tz, time_stamp_ltz from date_table;
    TIME_STAMP_TZ                         TIME_STAMP_LTZ
    ------------------------------------- ------------------------------
    12-Jan-09 12.58.29.906000 PM -04:00 12-Jan-09 12.58.29.906000 PM 
    12-Jan-09 12.58.29.906000 PM -04:00 12-Jan-09 12.58.29.906000 PM 
    SQL> alter session set time_zone='-04:00';
    Session altered.
    SQL> select time_stamp_tz, time_stamp_ltz from date_table;
    TIME_STAMP_TZ                         TIME_STAMP_LTZ
    ------------------------------------- ------------------------------
    12-Jan-09 12.58.29.906000 PM -04:00  12-Jan-09 
    10.57.36.642000 AM
    12-Jan-09 12.58.29.906000 PM -04:00   12-Jan-09 
    10.57.48.549000 AM

Similar Threads

  1. Transfer oracle to MySQL database
    By PerryCollins in forum Programming
    Replies: 2
    Last Post: 02-10-2010, 12:53 PM
  2. How do I change my Time Zone?
    By ponting77 in forum Windows Vista
    Replies: 0
    Last Post: 09-21-2009, 05:55 PM
  3. Oracle 11g R2 Database Release Coming in September
    By Russell Ferrier in forum Latest Hardware News
    Replies: 0
    Last Post: 08-20-2009, 06:44 AM
  4. Oracle increases prices on database options
    By John Petijohan in forum Latest Hardware News
    Replies: 0
    Last Post: 07-17-2009, 06:30 AM
  5. Setting time limits
    By inriteck in forum General Internet Terms
    Replies: 0
    Last Post: 07-18-2008, 02:41 PM

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
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48