This PR fixes the calculation of the nextUpdate trigger time in the MainCommand.php file. Currently, the nextUpdate time is calculated by adding the subscription frequency to the previousUpdate time. However, this does not consider the specific time for the next update. This PR modifies the calculation to ensure that the next update is triggered at 6am after the first update.
Summary of Changes
Modified the calculation of the nextUpdate variable in the execute function of MainCommand.php.
Replaced the previous calculation with a new DateTime object for the next day and set the time to 6am.
Added a check to ensure that the nextUpdate time is always after the previousUpdate time.
Created a new branch "fix-nextupdate-trigger-time" for these changes.
Fixes #1.
To checkout this PR branch, run the following command in your terminal:
Description
This PR fixes the calculation of the nextUpdate trigger time in the MainCommand.php file. Currently, the nextUpdate time is calculated by adding the subscription frequency to the previousUpdate time. However, this does not consider the specific time for the next update. This PR modifies the calculation to ensure that the next update is triggered at 6am after the first update.
Summary of Changes
Fixes #1.
To checkout this PR branch, run the following command in your terminal: