1

As per the Quartz code in CronTriggerImpl,

public Date computeFirstFireTime(org.quartz.Calendar calendar) {
    nextFireTime = getFireTimeAfter(new Date(getStartTime().getTime() - 1000l));

This ignores the timezone field and uses the system timezone even if the timezone was set on the Cron Trigger.

private transient TimeZone timeZone = null;

This causes boundary condition problems especially for DST situations. For example, say, a CronTrigger was built with America/New_York + the trigger startTime was created with the correct timezone, and then, the trigger was processed on a server in Europe, the above function takes the start time, extracts the millis and interprets them as per the server TZ. Thus, the DST window will be wrongly computed.

Is there any fix / workaround for this?

minifier
  • 21
  • 5

0 Answers0