User submitted datetime field and datetime now() field save different times on the database

What seems to be the problem:
I have a form where the user selects a date using the default html datetime-local widget.
When the user submits the form I take the time they selected and save it to my model and I also save another field using the now() function. But in my database the show different times. Both fields are datetimes.

They should have a few seconds difference because the user can select a time a few seconds/minutes earlier but not 7 hours, how can I make them the same “timezone”?

Steps to Reproduce:
Here’s my livewire component method:


            'ruta_ib' => $this->ruta_ib,

            'caja' => $this->caja,

            'hora' => $this->hora,

            'realizo' => $this->realizo,

            'hojas' => $this->hojas,

            'registro_timestamp' => now()


And here’s my input form:

<input id="hora" wire:model.lazy="hora" type="datetime-local" placeholder="Hora...">

Are you using the latest version of Livewire:
Yes, Laravel 7

Do you have any screenshots or code examples:

This looks like a timezone issue. Do you have the app timezone set as the same timezone on your system? The database is pulling time info from the system and is likely assuming it’s UTC but it may not be. Your app is defaulted to UTC but if you have it set to another timezone, it’ll parse in that information. Thus, resulting in the discrepancy.