Closed CerealP0rt closed 10 months ago
Crunz version: 3.4.1
PHP version: 8.2.8
Description The timezone setting in crunz.yml is ignored for task life time checks in https://github.com/crunzphp/crunz/blob/v3.4.1/src/Event.php#L1191-L1213 . This causes tasks to run outside of specified time ranges.
How to reproduce Have date.timezone=UTC in your php.ini and timezone: Europe/Berlin in your crunz.yml
date.timezone=UTC
timezone: Europe/Berlin
crunz task:
<?php use Crunz\Schedule; $scheduler = new Schedule(); $scheduler ->run('echo "Hello World!"') ->everyMinute() ->between('12:00', '20:00'); return $scheduler;
play around with values for between and observe that it is following UTC times and not Europe/Berlin as configured.
Hello @CerealP0rt, does https://github.com/crunzphp/crunz/pull/71 fixes your issue?
It does, thank you very much.
Fixed in https://github.com/crunzphp/crunz/releases/tag/v3.5.1
Crunz version: 3.4.1
PHP version: 8.2.8
Description
The timezone setting in crunz.yml is ignored for task life time checks in https://github.com/crunzphp/crunz/blob/v3.4.1/src/Event.php#L1191-L1213 . This causes tasks to run outside of specified time ranges.
How to reproduce
Have
date.timezone=UTC
in your php.ini andtimezone: Europe/Berlin
in your crunz.ymlcrunz task:
play around with values for between and observe that it is following UTC times and not Europe/Berlin as configured.