-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cron job times are interpreted as UTC timezone #74
Comments
It should be using local timezone machine, is it not? Might be something in @breejs/later |
It is not. Would be great if this is fixed. Any hint where one should look? Or anyone willing to look after it? |
Maybe start by looking through legacy docs at https://bunkat.github.io/later/ - I don't have the time but I am pretty sure I had reproduced this too a while back. |
cc @naz |
Later, which is what we use on the back-end to create the schedule, creates agnostic dates. However, it can be set to local time by doing |
We should def have this as a default, and since its breaking we'll do major semver bump. We can also note it in README/changelog. Anyone care to do a PR? ❤️ 🎉 |
Don't have time to have a deep look into it right now. But would happily review a PR if needed! |
Same issue for |
Just forked the repo and trying a PR ... Should a And I'm struggeling how to test the effect:
|
You will probably have to do for the test you should be able to use |
Created a PR including extended unit tests. Locally all tests are green (tested with Node 12 and 15) but sadly in TravisCI the run with Node 12 is red with one failing test at a complete different location. Same test was also red in different open PR #75. Anyone able to spot the reason and a possible fix? |
You should be able to set timezone on CI |
Timezone is not the problem of the failing test as far as I can see. And it is also failing in other PR that does not include the local date fix. |
Cannot get the 'run > job terminates after set time' test green on TravisCI. Locally it's always green. It uses |
I have been trying to fix that test issue and still haven’t figured it out. Will let you know when I do.
… On Jan 18, 2021, at 6:44 PM, Marc ***@***.***> wrote:
Cannot get the 'run > job terminates after set time' test green on TravisCI. Locally it's always green. It uses closeWorkerAfterMs that is shorter than job runtime so that it should get terminated. But the received exit event receives a code of 0 instead of 1. No connection to timezone. Any help appreciated. @naz @shadowgate15
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
fix: issue #74 use local timezone
Is this fixed? |
It is fixed and we do use localTime. What version of Bree are you using and how are you setting interval? And is the system that Bree is run on in the same timezone as your user? |
Thanks for your response, The problem was that I was running my app in a Docker container, and the timezone inside the container was not right. I fixed it by adding an environment variable TZ=America/Toronto for the container. Now everything is right. Thanks again!...awesome package! |
When I define a job with cron interval then the resulting execution times seem to be in UTC timezone. Is it possible to use local timezone?
The text was updated successfully, but these errors were encountered: