Skip to content
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

Task Life Time functions don't respect the timezone #62

Closed
CerealP0rt opened this issue Oct 11, 2023 · 3 comments
Closed

Task Life Time functions don't respect the timezone #62

CerealP0rt opened this issue Oct 11, 2023 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@CerealP0rt
Copy link

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

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.

@PabloKowalczyk
Copy link
Member

Hello @CerealP0rt, does #71 fixes your issue?

@PabloKowalczyk PabloKowalczyk added this to the v3.5 milestone Nov 3, 2023
@PabloKowalczyk PabloKowalczyk added the bug Something isn't working label Nov 3, 2023
@CerealP0rt
Copy link
Author

It does, thank you very much.

@PabloKowalczyk
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants