• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Timezone of the current session

 
Ranch Hand
Posts: 391
1
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DBTIMEZONE returns the time zone for the database

select dbtimezone from dual;
+00:00

(So it means my Oracle database timezone is set to UTC +00:00 )

SESSIONTIMEZONE returns time zone for the current session

select sessiontimezone from dual
+05:30

(So does it means that , it fetched the timezone from the system (because my Windows system is set to timezone +05:30 ) )

Shukran
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The documentation states that it is the timezone of your session with the DB http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions162.htm#SQLRF06105. So yes, I think it's the "client" timezone, in this case the one which was used to initiate the session/connection to the DB.
 
Mahtab Alam
Ranch Hand
Posts: 391
1
MySQL Database PHP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I execute these two queries from SQL*plus I get this

select dbtimezone from dual;
+00:00

select sessiontimezone from dual;
+05:30

Now when I execute these two queries from Oracle apex in the browser ,I get different result

select dbtimezone from dual;
+00:00

select sessiontimezone from dual;
+00:00

Whats the reason
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mahtab Alam wrote:

Now when I execute these two queries from Oracle apex in the browser ,I get different result

Whats the reason



I know nothing about Oracle Apex. But a quick search suggests that, that application needs to be configured to use the correct timezone. See this for example http://joelkallman.blogspot.in/2010/09/automatic-time-zone-support-in.html
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic