Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@Korbeil

Description

@Korbeil
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.