I
I
Ivan Vovchok2020-08-02 15:29:54
Laravel
Ivan Vovchok, 2020-08-02 15:29:54

Why does Carbon add 3 hours when rewriting to the database?

Hello everyone
I am working with timers in Laravel
There are two timestamp'a's in the timer table - started_atand stopped_at
Initially, when creating a new timer, it is filled started_atusing new Carbon, the time is recorded correctly.
But, when in another method I stopped_atalso record using new Carbon, the stop time of the timer is saved correctly, and the start time is rewritten as the stop time + 3 hours
. What is the problem, how can I treat it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Vovchok, 2020-08-02
@Vanovich

It seems that I figured out what was the matter
. This error was to blame for everything:
https://ma.ttias.be/laravel-mysql-auto-adding-upda...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question