Different Timezone [message #116417] |
Tue, 19 April 2005 20:23 |
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 |
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
|
|
|
|