Closed og1 closed 8 years ago
These variables are only meant to be used in relations. To be used as such, we can't make them methods. The only option to fix this would be to schedule a job that will reset them.
Hmm. In a relation the same bug will occur and be rather difficult to trace back to this particular issue. It would be nice if these constants were added to Servoy Java code with a proper getter. Anyway, thanks for your reply Patrick.
I think we should add a scheduler that resets these. What's wrong with that? It will simply run once a day.
If that's easy to do then it could avoid some nasty trouble ;-). However, it seems like it would be hard to get it to switch at exactly midnight or else it could still fail, especially if other jobs are running at the same time.
I think it will work in such a way that it tries to get it right at midnight. Possibly, it's done later. But maybe better than never.
Getters for scope variables would be nice indeed.
I added a schedule now to reset these
Great. Thanks, Patrick!
Kind regards,
Omar van Galen
06-2 12345 86 omar@intrasoft.nl mailto:omar@intrasoft.nl
On 8 jul. 2016, at 09:19, Patrick Ruhsert notifications@github.com wrote:
I added a schedule now to reset these
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Servoy/svyUtils/issues/6#issuecomment-231292434, or mute the thread https://github.com/notifications/unsubscribe/AITWZelN-R-IneABmPtkuMcTOMQgYma7ks5qTfoHgaJpZM4I-7q2.
svyDateUtils initializes the constants TODAY_START and TODAY_END by using an anonymous function for initTodayVars. This causes errors/bugs in any process that runs over midnight. The next day and all days after that the constants will have the same date until the process is restarted.