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

Timezone has no effect #49

Open
cluwong opened this issue Aug 26, 2019 · 1 comment
Open

Timezone has no effect #49

cluwong opened this issue Aug 26, 2019 · 1 comment

Comments

@cluwong
Copy link

cluwong commented Aug 26, 2019

Trying to set scheduling running at specific timezone, eg

   $schedule->command('test/command')
         ->timezone(\DateTimeZone('Australia/Sydney')->at('09:15');

The command is still run at server timezone.

@kstkn
Copy link
Collaborator

kstkn commented Mar 30, 2020

I have doubts that code you posted is exactly what you run, because it has syntax errors, but:

  • If you are really using an instance of DateTimeZone you should be fine. If not the case, please post exact code that you are running.
  • If you are using string that will not work, but emit a warning:
Warning: DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in php shell code on line 1

Note: after #61 instead of warning you will get a fatal if you pass a string:

Catchable fatal error: Argument 1 passed to timezone() must be an instance of DateTimeZone, string given, called in php shell code on line 1 and defined in php shell code on line 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants