codestudiohq / laravel-totem

Manage Your Laravel Schedule From A Web Dashboard
MIT License
1.8k stars 224 forks source link

Scheduled tasks firing 1 hour earlier #160

Closed WBDC closed 5 years ago

WBDC commented 5 years ago

Since summer time change in Europe/London, my Laravel Tasks firing 1 hour earlier. The timezone correctly set in app/config/app.php to 'timezone' => 'Europe/London',

SSHd into the server and checked the current time in tinker and it is showing the correct time.

Totem has its own config file, but there are no reference to the timezone settings. Also, the totem.index page showing all tasks where the "Next run time" is the correct one, but the "Last run" time showing 1 hour earlier. The run_at timestamp is correct in task_results table.

Capture

Any other updates I do, e.g. creating new user, etc, the timestamps are correct either in the database as well as on the front end except Totem.

Thank you

nachete1987 commented 5 years ago

Hello in my case, it was a BBDD problem. Totem use in ran_at column the attribute 'useCurrent();' and my timezone database server was not correct. Now, after change tz in BBDD server, time is registered correct.

qschmick commented 5 years ago

@WBDC Checking on this, was the comment from @nachete1987 useful?

WBDC commented 5 years ago

@WBDC Checking on this, was the comment from @nachete1987 useful?

Hi @qschmick I've uninstalled this package and developed my own so I don't know if it was useful or not. I did tried changing timezones (back in April), but those changes didn't resolve the issue.

qschmick commented 5 years ago

@WBDC Thanks for the feedback. As you are no longer using this and we haven't had any other people with this issue I'm going to close it. If you decide to retry Totem and encounter this please let us know and hopefully we can work through the issue.

paulrrogers commented 1 year ago

I may be running into this issue as well.

In my case the config/app.php has 'timezone' => 'UTC' and 'display_timezone' => 'America/New_York', my DB defaults to UTC and relies on TIMESTAMP WITHOUT TIME ZONE in PostgreSQL. Rows in task_results.ran_at appear to be UTC yet appear in the UI to be EST/EDT for Last Run and UTC for Next Run.

Could there be some inconsistency or disconnect between how moment() JS is used and DB values?