Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTC times (application) and BST database

user5716448Jul 10 2018 — edited Jul 10 2018

Hi,

oracle version 11.2.0,.3

We get data written to our database from another system and noticed the times are one hour earlier than displayed on application screen.

system developer advised they are stored in UTC and converted into local time for display.

This means our database shows e.g 5.00 a.m. whereas the application shows 6.00 a.m. (BST - British Summer Time)

Just considering options

1) ask them to supply the time as local time i.e. in this case 6.00 a.m.

2) Don't want to try adding 1 hour as have to watch when BST ends as then wouldn't need to add hour

Thoughts - want times showing correctly with minimal intervention?

Is there a convert utc to local time function?  Saw new_time but doesn't take UTc as input

I have used

CAST ((from_tz ( CAST (<date_datatype> AS TIMESTAMP) ,'UTC' ) at local ) AS DATE)

However, whilst this works for dates/time created during BST - if wish to look at dates prior to this e.g February  - it is adding one hour to them.

How can we ensure regardless of when look at data it converts to an accurate local time according to local time at that date

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 7 2018
Added on Jul 10 2018
5 comments
950 views