QuartzScheduler implements IScheduler { void setTimezone( CronTrigger cronTrigger, String timezone ) throws SchedulerException { try { CronExpression cronEx = new CronExpression( cronTrigger.getCronExpression() ); cronEx.setTimeZone( TimeZone.getTimeZone( timezone ) ); cronTrigger.setCronExpression( cronEx ); } catch ( ParseException e ) { throw new SchedulerException( Messages.getInstance().getString( "ComplexJobTrigger.ERROR_0001_InvalidCronExpression" ), e ); } } QuartzScheduler( SchedulerFactory schedulerFactory );  QuartzScheduler(); void setQuartzSchedulerFactory( SchedulerFactory quartzSchedulerFactory ); Scheduler getQuartzScheduler(); Job createJob( String jobName, String actionId, Map<String, Serializable> jobParams, IJobTrigger trigger ); Job createJob( String jobName, Class<? extends IAction> action, Map<String, Serializable> jobParams,
      IJobTrigger trigger ); Job createJob( String jobName, Class<? extends IAction> action, Map<String, Serializable> jobParams,
      IJobTrigger trigger, IBackgroundExecutionStreamProvider outputStreamProvider ); Job createJob( String jobName, String actionId, Map<String, Serializable> jobParams, IJobTrigger trigger,
      IBackgroundExecutionStreamProvider outputStreamProvider ); static Trigger createQuartzTrigger( IJobTrigger jobTrigger, QuartzJobKey jobId ); @Override void updateJob( String jobId, Map<String, Serializable> jobParams, IJobTrigger trigger ); Map<IScheduleSubject, ComplexJobTrigger> getAvailabilityWindows(); List<IJobResult> getJobHistory( String jobId ); void triggerNow( String jobId ); @SuppressWarnings( "unchecked" ) Job getJob( String jobId ); @SuppressWarnings( "unchecked" ) List<Job> getJobs( IJobFilter filter ); Integer getMinScheduleInterval( IScheduleSubject subject ); ComplexJobTrigger getSubjectAvailabilityWindow( IScheduleSubject subject ); void pause(); void pauseJob( String jobId ); void removeJob( String jobId ); void start(); void resumeJob( String jobId ); void setAvailabilityWindows( Map<IScheduleSubject, ComplexJobTrigger> availability ); void setMinScheduleInterval( IScheduleSubject subject, int intervalInSeconds ); void setSubjectAvailabilityWindow( IScheduleSubject subject, ComplexJobTrigger availability ); static ComplexJobTrigger createComplexTrigger( String cronExpression ); SchedulerStatus getStatus(); void shutdown(); static String prettyPrintMap( Map<String, Serializable> map ); void addListener( ISchedulerListener listener ); void setListeners( Collection<ISchedulerListener> listeners ); void fireJobCompleted( IAction actionBean, String actionUser, Map<String, Serializable> params,
      IBackgroundExecutionStreamProvider streamProvider ); @Override void validateJobParams( Map<String, Serializable> jobParams ); static final String RESERVEDMAPKEY_ACTIONCLASS; static final String RESERVEDMAPKEY_ACTIONUSER; static final String RESERVEDMAPKEY_ACTIONID; static final String RESERVEDMAPKEY_STREAMPROVIDER; static final String RESERVEDMAPKEY_STREAMPROVIDER_INPUTFILE; static final String RESERVEDMAPKEY_UIPASSPARAM; static final String RESERVEDMAPKEY_LINEAGE_ID; static final String RESERVEDMAPKEY_RESTART_FLAG; static final String RESERVEDMAPKEY_AUTO_CREATE_UNIQUE_FILENAME; static final String RESERVEDMAPKEY_APPEND_DATE_FORMAT; }
@Test public void testSetTimezone() throws Exception { CronTrigger cronTrigger = new CronTrigger(); cronTrigger.setCronExpression( new CronExpression( "0 15 10 ? * 6L 2002-2018" ) ); String currentTimezoneId = TimeZone.getDefault().getID(); new QuartzScheduler().setTimezone( cronTrigger, currentTimezoneId ); assertNotNull( cronTrigger.getTimeZone() ); assertEquals( currentTimezoneId, cronTrigger.getTimeZone().getID() ); }