Oracle 12c and Jobs running one hour apart after changing time for hourly use I have an Oracle 12c database in which I have detected that the scheduled jobs are running one hour apart after the change of time on the server, checking in the database I see that the SYSTIMESTAMP differ with the DBTIMEZONE

SQL> select dbtimezone, sessiontimezone from dual;

DBTIMEZONE

SESSIONTIMEZONE



-04: 00
-05: 00

In the operating system I run:
date + "% Z% z"

CST -0500

Is it correct that these values ​​of SYSTIMESTAMP and DBTIMEZONE are different?, when the time change is made is it necessary to modify something in the database?
If you found the timezone of your database to be incorrect and you are sure this causes the issue (I have seen this before), you can change it with.

set_time_zone_clause::=



For example:

SQL&gt; select property_value from database_properties where property_name = 'DBTIMEZONE';

PROPERTY_VALUE
--------------------
+01:00


You can set a named time zone like:

SQL&gt; alter database set time_zone = 'Europe/Budapest';

Database altered.


Or a fixed value:

alter database set time_zone = '-05:00';


I used the former. Then restart the database:

SQL&gt; shu immediate
Database closed.
Database dismounted.
startup
ORACLE instance shut down.
SQL&gt; ORACLE instance started.

Total System Global Area 1073737800 bytes
Fixed Size                  8904776 bytes
Variable Size             285212672 bytes
Database Buffers          771751936 bytes
Redo Buffers                7868416 bytes
Database mounted.
Database opened.
SQL&gt; select property_value from database_properties where property_name = 'DBTIMEZONE';

PROPERTY_VALUE
--------------------
Europe/Budapest

SQL&gt;



  set_time_zone_clause
  
  This clause has the same semantics in CREATE DATABASE and ALTER
  DATABASE statements. When used in with ALTER DATABASE, this clause
  resets the time zone of the database. To determine the time zone of
  the database, query the built-in function DBTIMEZONE. After setting or
  changing the time zone with this clause, you must restart the database
  for the new time zone to take effect.


Keep in mind this may not always work, because:


  Oracle Database normalizes all new TIMESTAMP WITH LOCAL TIME ZONE data
  to the time zone of the database when the data is stored on
  disk.Oracle Database does not automatically update existing data in
  the database to the new time zone. Therefore, you cannot reset the
  database time zone if there is any TIMESTAMP WITH LOCAL TIME ZONE data
  in the database. You must first delete or export the TIMESTAMP WITH
  LOCAL TIME ZONE data and then reset the database time zone. For this
  reason, Oracle does not encourage you to change the time zone of a
  database that contains data.
  
  For a full description of this clause, refer to set_time_zone_clause
  in the documentation on CREATE DATABASE.


Also, you should apply the latest DST patch as well, so the database knows when to set the time forward or backward for daylight saving.