Skip to content
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

[4.4] Determine the next task run date with the timezone of the site #43259

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Apr 11, 2024

Summary of Changes

When using Cron expressions in a task, then they are always executed in UTC timezone. This leads to an issue when the cron ob should run on a specific time on the day and the Joomla site is in a timezone where the there are DST changes. This pr calculates the next run date according to the timezone of Joomla and displays the next execution date in the same time when editing the task (it is the same time as in the tasks list then).

Testing Instructions

  • Define a timezone in Joomla, other than UTC
  • Create a new sleep task and define a cron expression like
    image
  • Open the execution history tab

Actual result BEFORE applying this Pull Request

It shows the UTC time as next execution date.

Expected result AFTER applying this Pull Request

It shows the correct time as next execution date.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@hytsch
Copy link

hytsch commented Apr 11, 2024

checked, works fine, thanks :)

@fgsw
Copy link

fgsw commented Apr 12, 2024

I have tested this item ✅ successfully on 2a56945


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43259.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 12, 2024
@Quy
Copy link
Contributor

Quy commented Apr 12, 2024

@laoneo Please fix phpcs. Thanks.

@Quy Quy removed the RTC This Pull Request is Ready To Commit label Apr 12, 2024
@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 15, 2024
@HLeithner HLeithner added the bug label Apr 24, 2024
@HLeithner HLeithner changed the title Determine the next task run date with the timezone of the site [4.4] Determine the next task run date with the timezone of the site Apr 24, 2024
@MacJoom MacJoom self-assigned this Apr 26, 2024
@MacJoom MacJoom added this to the Joomla! 4.4.5 milestone Apr 26, 2024
@MacJoom MacJoom merged commit d1bef33 into joomla:4.4-dev Apr 26, 2024
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 26, 2024
@MacJoom
Copy link
Contributor

MacJoom commented Apr 26, 2024

Thank you!

@laoneo laoneo deleted the scheduler/tz branch April 26, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants