-
Notifications
You must be signed in to change notification settings - Fork 689
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
timezone issue for scheduler #315
Comments
I found 2 issues here:
|
|
pass timezone=utc to BackgroundScheduler like this:
|
Didn't you just say that you had to create |
yes. I created /etc/timezone as a workaround solution |
For 1), lots of people use an explicit time zone and it works fine for them. Would you mind giving me a complete, minimal standalone script that demonstrates the problem? |
This is the issue I'm seeing with
/etc/localtime does say UTC but since the zone is always local when using /etc/localtime, APScheduler doesn't work.
|
@bngo92 Does this happen with the latest versions of tzlocal and apscheduler? |
@bngo92 You need to use a timezone name (such as Europe/Helsinki). For me it was America/New_York. |
As for the first observed problem, it happened while restoring an existing job. The timezone you set for the scheduler does not affect jobs added before that. So, not a bug. As for the second, report that to the tzlocal issue tracker. |
sample code from apscheduler docs:
it works for ubuntu, but after I change OS to amazonlinux, does not work
error message:
then I add a file /etc/timezone with content 'Etc/UTC', it works
when add a scheduled job, should it use timezone I passed in code otherwise read from /etc/timezone ?
looks like it always get it from system config
The text was updated successfully, but these errors were encountered: