Open GitarPlayer opened 7 months ago
great observations.
@jbradberry you may curious at taking a look at the rationale provided above
@tvo318 maybe we just drop that statement from the docs, as it doesn't seem applicable anymore
i see we have some coverage around DST https://github.com/fosterseth/awx/blob/0f150aa3b3ebddf3b4898177bbf96ba5bde84261/awx/main/tests/functional/api/test_schedules.py#L433
I think the issue is more complex than the docs make it out to be. I do know that the rrule string stored in the database can include timezone information, so it seems to me that @GitarPlayer is probably more or less correct.
Please confirm the following
security@ansible.com
instead.)Bug Summary
The documentation states the following:
But I think this is misleading because the scheduler actually follows DST transitions. What happens according to my understanding:
update_computed_fields_no_save
the next occurence of the rrule string is calculated after UTC now(). https://github.com/ansible/awx/blob/devel/awx/main/models/schedules.py#L276Since dateutil.rrule is DST aware, jobs scheduled in local time zones should not move relative to a local timezone but relative to UTC time.
Example:
python3 rrule.py:
I also scheduled such a job with Ansible Automation Hub 4.5.2 to confirm that it honors DST transitions and it did. We wanted to use AAP for business logic scheduling and in this use case it was important for us that the job run precisely at the same time in local time throughout the year.
AWX version
2.4 Ansible Automation Platform
Select the relevant components
Installation method
openshift
Modifications
no
Ansible version
2.15
Operating system
No response
Web browser
No response
Steps to reproduce
Expected results
According to the documentation the job should shift relative to the local time zone.
Actual results
The job shifts relative to UTC time zone after the DST transition. But it runs correctly in the local time zone throughout the year.
Additional information
No response