Repository: tapestry-5
Updated Branches:
refs/heads/master a260fa25e -> fb1d26825
TAP5-2494: CronSchedule can now be created with a specific TimeZone
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/fb1d2682
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/fb1d2682
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/fb1d2682
Branch: refs/heads/master
Commit: fb1d268257a9750b389cafe25e587194750d8af9
Parents: a260fa2
Author: Jochen Kemnade <jochen.kemnade@eddyson.de>
Authored: Mon Aug 31 09:07:53 2015 +0200
Committer: Jochen Kemnade <jochen.kemnade@eddyson.de>
Committed: Mon Aug 31 09:08:57 2015 +0200
----------------------------------------------------------------------
.../org/apache/tapestry5/ioc/services/cron/CronSchedule.java | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/fb1d2682/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/cron/CronSchedule.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/cron/CronSchedule.java
b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/cron/CronSchedule.java
index 0198d59..7356986 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/cron/CronSchedule.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/cron/CronSchedule.java
@@ -18,6 +18,7 @@ import org.apache.tapestry5.ioc.internal.services.cron.CronExpression;
import java.text.ParseException;
import java.util.Date;
+import java.util.TimeZone;
public class CronSchedule implements Schedule
{
@@ -25,9 +26,15 @@ public class CronSchedule implements Schedule
public CronSchedule(String cronExpression)
{
+ this(cronExpression, TimeZone.getDefault());
+ }
+
+ public CronSchedule(String cronExpression, TimeZone timeZone)
+ {
try
{
this.cron = new CronExpression(cronExpression);
+ this.cron.setTimeZone(timeZone);
} catch (ParseException e)
{
throw new RuntimeException(e);
|