Closed
Description
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.