Skip to Main Content

SQL & PL/SQL

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!

LOCALTIMESTAMP, SYSTIMESTAMP vs daylight saving time change

xxsawerApr 8 2016 — edited Apr 10 2016

Hi All,

I have recently found a problem that LOCALTIMESTAMP and CURRENT_TIMESTAMP as well are returning wrong values. These functions return time exactly one hour older than system time and than what is returned by SYSTIMESTAMP. SYSTIMESTAMP returns correct date.

I think that this can be caused by daylight saving time change. On March 27. there was a change to summer time, so the time has moved one hour ahead. I found out that affected sessions were started before March 27., so I believe that LOCALTIMESTAMP and CURRENT_TIMESTAMP still display winter time, while SYSTIMESTAMP was properly switched to winter time.

If I start new session (same way as all previous were started) then all timestamps display proper time.

Our DB version is:

SQL> select * from v$VERSION;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE    11.2.0.4.0      Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

Did anybody observed the same issue?

This post has been answered by chris227 on Apr 8 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2016
Added on Apr 8 2016
25 comments
11,137 views