[jira] [Commented] (OFBIZ-11035) Add timezone support to recurring job temporal expressions

2020-10-26 Thread Lalit Dashora (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17220614#comment-17220614
 ] 

Lalit Dashora commented on OFBIZ-11035:
---

Hello [~pawan]

I tried to use this feature of recurrence TimeZone but it didn't work for me.

Here are the steps I tried: 
1. Updated the default timeZone from start.properties file.
2. Created a job which will execute on daily basis. Also added 
recurrenceTimeZone attribute.
3. The server picked and executed the job successfully and further created new 
job (next day) with the same time. For example runTime data for the imported 
job was 26 Oct 2020 07:00 AM and after successful execution, the next job was 
created with time 27 Oct 2020 07:00 AM. Found that there was no change in time 
of recurring job.


Here in this case the system is properly adding the timeZone both default and 
recurrenceTimeZone. Verified the same by getting the timeZone and printing the 
log statements. Found that in createRecurrence method the system is trying to 
set the runTime by java.sql.Timestamp(next) and I think this is not working 
properly.

Let's assume that the server is kept in UTC/GMT timeZone and I want the jobs to 
execute as per the Eastern time (EST). I want to create a job which will run 
daily at 07:00 EST so for this I will create the data with runTime of 07:00 AM 
and will set recurrenceTimeZone as EST. Here, in this case, the server for the 
first time will pick the job at 07:00 AM (UTC) then from the next job onwards 
the server will convert and set the time as per 07:00 AM EST. This thing won't 
help much in production systems since for the first day the jobs will not be 
executed on correct timing and from next day onwards the time of jobs will 
change. Instead of adding the timeZone support for the recurring job (child 
jobs) it should be done as soon as the job is imported (parent/super job). 
Doing this way won't need to calculate and set time for recurring jobs. 
Continuing with the above example, on importing the job data for 07:00 AM with 
recurring timeZone as EST the system should first convert the DateTime as per 
the timeZone and then execute the job. So from the next job, the system will 
automatically set proper time without any code change.

I think we can reopen this ticket.

Thanks!

> Add timezone support to recurring job temporal expressions
> --
>
> Key: OFBIZ-11035
> URL: https://issues.apache.org/jira/browse/OFBIZ-11035
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework/webtools
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-11035.patch, OFBIZ-11035.patch
>
>
> Link of the discussion: [https://markmail.org/message/jsjqmjypaihbbldn]
> *As per Scott:*
> Trying to decide on the best way to define a *temporal* *expression* for a 
> recurring job where the *temporal* *expression* should be evaluated using a 
> *timezone* other than whatever the default *timezone* is for the system.
> The use case is having a system that runs on UTC time but needs to send a 
> report at 5 pm Pacific Time every day regardless of whether or not daylight 
> savings is in effect.
> Two options:
>  # Add a field to *JobSandbox* such as recurrenceTimeZone (or better name!)
>  # Use whatever *timezone* is available in the RunTime data service context
> Based on the discussion on Dev Mailing list #1 will be used to implement this 
> feature.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11035) Add timezone support to recurring job temporal expressions

2019-07-25 Thread Pawan Verma (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16892630#comment-16892630
 ] 

Pawan Verma commented on OFBIZ-11035:
-

Hi [~soledad]

Suggestions are looking good to me. I've updated the patch.[^OFBIZ-11035.patch]

> Add timezone support to recurring job temporal expressions
> --
>
> Key: OFBIZ-11035
> URL: https://issues.apache.org/jira/browse/OFBIZ-11035
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework/webtools
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: OFBIZ-11035.patch, OFBIZ-11035.patch
>
>
> Link of the discussion: [https://markmail.org/message/jsjqmjypaihbbldn]
> *As per Scott:*
> Trying to decide on the best way to define a *temporal* *expression* for a 
> recurring job where the *temporal* *expression* should be evaluated using a 
> *timezone* other than whatever the default *timezone* is for the system.
> The use case is having a system that runs on UTC time but needs to send a 
> report at 5 pm Pacific Time every day regardless of whether or not daylight 
> savings is in effect.
> Two options:
>  # Add a field to *JobSandbox* such as recurrenceTimeZone (or better name!)
>  # Use whatever *timezone* is available in the RunTime data service context
> Based on the discussion on Dev Mailing list #1 will be used to implement this 
> feature.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (OFBIZ-11035) Add timezone support to recurring job temporal expressions

2019-07-25 Thread Nicolas Malin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16892510#comment-16892510
 ] 

Nicolas Malin commented on OFBIZ-11035:
---

Two small remarks :

 * don't create a xml element without node  -> 

 * Do you tried to always use a time zone ?

 
{code:java}
TimeZone timeZone = jobValue.get("recurrenceTimeZone") != null ? 
TimeZone.getTimeZone(jobValue.getString("recurrenceTimeZone") : 
TimeZone.getDefault();
next = expr.next(Calendar.getInstance(timeZone));
{code}
 

 

> Add timezone support to recurring job temporal expressions
> --
>
> Key: OFBIZ-11035
> URL: https://issues.apache.org/jira/browse/OFBIZ-11035
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework/webtools
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: OFBIZ-11035.patch
>
>
> Link of the discussion: [https://markmail.org/message/jsjqmjypaihbbldn]
> *As per Scott:*
> Trying to decide on the best way to define a *temporal* *expression* for a 
> recurring job where the *temporal* *expression* should be evaluated using a 
> *timezone* other than whatever the default *timezone* is for the system.
> The use case is having a system that runs on UTC time but needs to send a 
> report at 5 pm Pacific Time every day regardless of whether or not daylight 
> savings is in effect.
> Two options:
>  # Add a field to *JobSandbox* such as recurrenceTimeZone (or better name!)
>  # Use whatever *timezone* is available in the RunTime data service context
> Based on the discussion on Dev Mailing list #1 will be used to implement this 
> feature.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (OFBIZ-11035) Add timezone support to recurring job temporal expressions

2019-07-24 Thread Pawan Verma (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16892417#comment-16892417
 ] 

Pawan Verma commented on OFBIZ-11035:
-

If no one has any objection, I would like to commit it.

> Add timezone support to recurring job temporal expressions
> --
>
> Key: OFBIZ-11035
> URL: https://issues.apache.org/jira/browse/OFBIZ-11035
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework/webtools
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: OFBIZ-11035.patch
>
>
> Link of the discussion: [https://markmail.org/message/jsjqmjypaihbbldn]
> *As per Scott:*
> Trying to decide on the best way to define a *temporal* *expression* for a 
> recurring job where the *temporal* *expression* should be evaluated using a 
> *timezone* other than whatever the default *timezone* is for the system.
> The use case is having a system that runs on UTC time but needs to send a 
> report at 5 pm Pacific Time every day regardless of whether or not daylight 
> savings is in effect.
> Two options:
>  # Add a field to *JobSandbox* such as recurrenceTimeZone (or better name!)
>  # Use whatever *timezone* is available in the RunTime data service context
> Based on the discussion on Dev Mailing list #1 will be used to implement this 
> feature.
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (OFBIZ-11035) Add timezone support to recurring job temporal expressions

2019-05-24 Thread Pawan Verma (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16848038#comment-16848038
 ] 

Pawan Verma commented on OFBIZ-11035:
-

Added a new field to JobSandbox "recurrenceTimeZone" and used the same field 
while creating the calendar inside PersistedServiceJob.init() method.

Attached patch for the improvement. Thanks!

> Add timezone support to recurring job temporal expressions
> --
>
> Key: OFBIZ-11035
> URL: https://issues.apache.org/jira/browse/OFBIZ-11035
> Project: OFBiz
>  Issue Type: Improvement
>  Components: framework/webtools
>Affects Versions: Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: OFBIZ-11035.patch
>
>
> Link of the discussion: [https://markmail.org/message/jsjqmjypaihbbldn]
> *As per Scott:*
> Trying to decide on the best way to define a *temporal* *expression* for a 
> recurring job where the *temporal* *expression* should be evaluated using a 
> *timezone* other than whatever the default *timezone* is for the system.
> The use case is having a system that runs on UTC time but needs to send a 
> report at 5 pm Pacific Time every day regardless of whether or not daylight 
> savings is in effect.
> Two options:
>  # Add a field to *JobSandbox* such as recurrenceTimeZone (or better name!)
>  # Use whatever *timezone* is available in the RunTime data service context
> Based on the discussion on Dev Mailing list #1 will be used to implement this 
> feature.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)