frean04

Managing Time Zones in SQL (Oracle)

Discussion created by frean04 Employee on Nov 27, 2017

I wanted to share with you something i discovered rcently. Sometimes when you need to record a date and time, you need to use another time zone than the one the server rests on. 

 

This can be done by using the following (in this example, we want the 'Europe/Dublin' timezone):

 

select cast(cast(sysdate as timestamp) at time zone 'Europe/Dublin' as date)

from dual

 

The complete list of timezones can be found here:

 

A Time Zones 

Outcomes