Skip to main content
Solved

DBTIMEZONE SQL Query

  • November 24, 2021
  • 1 reply
  • 282 views

Forum|alt.badge.img+7
  • Do Gooder (Customer)

Hi!
Running this query:
select SYSDATE, current_date, SYSTIMESTAMP, DBTIMEZONE FROM dual

We wondering what is DBTIMEZONE, and how is it used in IFS?

Can anyone explain more about this?

Best answer by Manoj Ruwanhewa

Hi @awe ,

SYSDATE returns the current date and time set for the operating system on which the database server resides.
CURRENT_DATE returns the current date in the session time zone.
DBTIMEZONE is the internal time zone of TIMESTAMP WITH LOCAL TIME values


current time at DBTIMEZONE can be fetched as below 


select SYSTIMESTAMP AT TIME ZONE DBTIMEZONE from dual;


Local time zone can be changed as per the below article

https://www.databasejournal.com/features/oracle/article.php/3072991/Oracle-Time-Zone.htm

 

This topic has been closed for replies.

1 reply

Manoj Ruwanhewa
Superhero (Partner)
Forum|alt.badge.img+15
  • Superhero (Partner)
  • Answer
  • November 24, 2021

Hi @awe ,

SYSDATE returns the current date and time set for the operating system on which the database server resides.
CURRENT_DATE returns the current date in the session time zone.
DBTIMEZONE is the internal time zone of TIMESTAMP WITH LOCAL TIME values


current time at DBTIMEZONE can be fetched as below 


select SYSTIMESTAMP AT TIME ZONE DBTIMEZONE from dual;


Local time zone can be changed as per the below article

https://www.databasejournal.com/features/oracle/article.php/3072991/Oracle-Time-Zone.htm