Skip to end of metadata
Go to start of metadata

How does JobScheduler handle daylight saving time and time zones?

Configuration

The JobScheduler uses the time zone of its host, unless specifically configured to do otherwise.
The time zone of the JobScheduler can be configured with the http://www.sos-berlin.com/doc/en/scheduler.doc/command_line.xml#option_time-zone -time-zone command line option or the time_zone attribute, if the JobScheduler is to be operated in or with another time zone as its host.

Job and order time zones can be set using either the time_zone attribute or run_time.

Time zones are specified in JobScheduler according to the TZ database.

Daylight saving time

UTC does not change with the seasons, but local time or civil time may change if a time zone jurisdiction observes daylight saving time (summer time).

Modification of start times or stopping the JobScheduler during the change over or shift between standard and daylight saving times is not necessary. The JobScheduler uses UTC times for all its internal operations. This ensures a continual flow of operation without breaks or repetitions regardless of any changes in local time.

Change from standard time to summer time

The clock is moved forward during the change from standard to summer (daylight saving) time (in Germany this takes place from 2 o'clock in the morning, standard time, to 3 o'clock). Start times that are scheduled in this period are 'postponed' until the start of summer time (3 o'clock in the morning in Germany, summer time). This ensures that all runs planned for the 'missing' hour are carried out. Repeat intervals, that are scheduled for the missing hour are generally only carried out once.

Change from summer time to standard time

No particular measures are required during the change from summer to standard time. Even when 'putting back the clock' causes the hour to be 'repeated' (when seen from the standpoint of local time), JobScheduler's internal use of UTC ensures a continual flow of operations (see the examples later in this FAQ) and ensures that unwanted repetition of planned jobs and orders is avoided.

Agent operation

The time zone of the JobSchedulers, under which a job has been configured determines the point in time when a job or order is executed. This means that the time zone of the client and not that of the agent applies when a job or order is being executed remotely.
The Agent can be seen simply as a program that takes over the processing and does not have any influence over the control (i.e. the runtimes) of the processes themselves. Control lies exclusively with the client.

If, however, an Agent is started with the "JobScheduler" role then the local time zone of the Agent/JobScheduler will apply for locally configured jobs and orders.

Examples

The folowing examples illustrate the changes between standard and summer time for the city of Helsinki in the year 2012.
They also make clear that the UTC time, which JobScheduler uses internally, progresses uniformly even during the change from standard to daylight saving time.
Standard time in Helsinki is UTC +2h, daylight saving time is UTC +3h.

Change from standard time to summer time

In contrast to Germany, the changeover from standard to summer time takes place at 3 o'clock.

Change from summer time to standard time

In contrast to Germany, the changeover from summer to standard time takes place at 4 o'clock.

Logging

The JobScheduler's time zone is used for the timestamp column in log files.
scheduler.log uses local time.

XML commands

Timestamps in XML answers are marked with suffix "Z" for UTC time.

Changing time zones

JobScheduler uses the Joda API for time-related operations, which includes the TZ Database. If political decisions should lead to changes to time zones, then the TZ Database can be updated using the procedure described on the joda time web site.
However, before replacing the Joda API database in the lib directory with a newer one we strongly advise first checking for possible incompatibilities, which could possibly lead to malfunctioning of JobScheduler.