/** * <p> * Sets the time zone for which the <code>cronExpression</code> of this * <code>CronTrigger</code> will be resolved. * </p> * * <p>If {@link #setCronExpression(CronExpression)} is called after this * method, the TimeZon setting on the CronExpression will "win". However * if {@link #setCronExpression(String)} is called after this method, the * time zone applied by this method will remain in effect, since the * String cron expression does not carry a time zone! */ public void setTimeZone(TimeZone timeZone) { if ( this.cronEx != null ) { this.cronEx.setTimeZone( timeZone ); } this.timeZone = timeZone; }
public void setCronExpression(CronExpression cronExpression) { TimeZone origTz = getTimeZone(); this.cronEx = cronExpression; this.cronEx.setTimeZone( origTz ); }
public Object clone() { CronExpression copy = null; try { copy = new CronExpression(getCronExpression()); if(getTimeZone() != null) copy.setTimeZone((TimeZone) getTimeZone().clone()); } catch (ParseException ex) { // never happens since the source is valid... throw new IncompatibleClassChangeError("Not Cloneable."); } return copy; } }