Home » RDBMS Server » Server Administration » Different Timezone
Different Timezone [message #116417] Tue, 19 April 2005 20:23 Go to next message
win_vj
Messages: 16
Registered: March 2005
Location: India
Junior Member
Hi,

I have a MST timenone on my server and PST timezone on my database. Now i want that whenever i select sysdate, it should give me the time according to MST not as PST.

Let say a record is inserted in database at 5:00 PM (EST) so when i select the date it should show me 6:00 PM (MST).

Thanks for support

Win
Re: Different Timezone [message #116466 is a reply to message #116417] Wed, 20 April 2005 04:04 Go to previous messageGo to next message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
So, why don't you just change your database or session's timezone?

SQL> col dbtimezone      format a30
SQL> col sessiontimezone format a30
SQL> SELECT dbtimezone, sessiontimezone FROM dual;
DBTIMEZONE                     SESSIONTIMEZONE
------------------------------ ------------------------------
+00:00                         +02:00

SQL>
SQL> col tzabbrev format a5
SQL> SELECT UNIQUE tzname FROM v$timezone_names
  2   WHERE tzname in ('MST', 'PST', 'EST');
TZNAME
----------------------------------------------------------------
EST
MST
PST

SQL>
SQL> ALTER SESSION SET TIME_ZONE='PST';

Session altered.

SQL>
SQL> SELECT dbtimezone, sessiontimezone FROM dual;
DBTIMEZONE                     SESSIONTIMEZONE
------------------------------ ------------------------------
+00:00                         PST


Best regards.

Frank
Re: Different Timezone [message #116590 is a reply to message #116466] Wed, 20 April 2005 14:56 Go to previous message
win_vj
Messages: 16
Registered: March 2005
Location: India
Junior Member
Thanks a Ton!
Previous Topic: I need help as fast as possible
Next Topic: Could Not Mount the Oracle DB
Goto Forum:
  


Current Time: Sun Jan 26 04:35:03 CST 2025