Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Scheduler] Using same timezone as TriggerInterface::getNextRunDate one #49800

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

Closed
Korbeil opened this issue Mar 24, 2023 · 1 comment
Closed

Comments

@Korbeil
Copy link
Contributor

Korbeil commented Mar 24, 2023

Symfony version(s) affected

6.3

Description

I'm not sure it's a bug but while working on debug:scheduler command and testing the component I find it strange that we don't use the same timezone as the one given in the $run parameter of the getNextRunDate method.

Here is an example:

$ bin/console debug:scheduler default --from="2025-04-20 08:00:00" --from-format="Y-m-d H:i:s" --from-timezone="America/Curacao"

Information for Scheduler "default"
===================================

 ------------------------------- --------------------------------------------------------- --------------------------- 
  Message                         Trigger type                                              Next run date              
 ------------------------------- --------------------------------------------------------- --------------------------- 
  App\Message\OneMonthMessage     Symfony\Component\Scheduler\Trigger\DateIntervalTrigger   2025-04-24T18:50:13+02:00  
  App\Message\TwoMinutesMessage   Symfony\Component\Scheduler\Trigger\DateIntervalTrigger   2025-04-20T14:00:13+02:00  
 ------------------------------- --------------------------------------------------------- --------------------------- 

What are your thoughts on it ? I can make the patch but I prefer to ask if it's something that should be done or that we can ignore :)

How to reproduce

Use TriggerInterface::getNextRunDate and give him a Timezone that is different from the default timezone you have configured in your php.ini file.

@fabpot
Copy link
Member

fabpot commented Sep 16, 2023

Fixed by #51674

@fabpot fabpot closed this as completed Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants