The UTC timezone. Why SYSDATE might be wrong for you

preview_player
Показать описание
Two of the most common date expressions we will ever type are "SYSDATE" and "SYSTIMESTAMP". But when you move your database to cloud, those functions might not do what you are expecting them to do for client facing parts of your application. But before you start to rewrite all of your code to use CURRENT_DATE and CURRENT_TIMESTAMP, there might be an easier solution. SQL Translation Profiles can dynamically change your SQL as it is passed to the database...


Subscribe for new tech videos every week



Are you serious? A free Oracle database forever ?!?!?!?! Oh yeah!!!




Music: Kevin Mcleod, incomptech

#sysdate #cloud #translation
Рекомендации по теме
Комментарии
Автор

The beauty of UTC is that it is not a time zone as such but a reference time, and it is not subject to daylight savings time. It is simply the globally recognized coordinated universal time. GMT, however is not the same thing. It is the time zone of the United Kingdom when they are on standard (Winter) time. But, I have observed system admins treating GMT as if it is like UTC and then wonder why their server goes into DST unexpectedly. It is good practice to set server clocks to UTC and utilize built-in database features for handling time zones. Oracle has particularly powerful tools for this. Cheers, Russ

russellcannon
Автор

That is a really really handy demo! Thanks Connor!

skronzo
Автор

Never even knew this existed. Great info!

matthewtatterton
Автор

DBMS_ADVANCED_REWRITE is one of the earlier option to convert statements.

debpatro