Problem With Date And Create Date

0

Hi,

I have a problem with my system running in production. The "date" and "creation date".

The first one is the date I choose, and the second is the date the system take form server.

I select the correct date and always show one day after the creation date, dont know why.

When I try tro edit the check-in or check-out the date looks good, but the system show the wrong one in the list of check it or checkout. Imagen attached.

I use the system in spanish, dont know if that can be a problem.

How I can fix it?

Thanks.

Question Resolved For: Warehouse Inventory Management Solution 0 Votes 12 Answers 296 Views
Asked by Joan 1 year ago

0

Answered by Joan 1 year ago

Image show the correct date in edit mode

0

Answered by Mian Saleem 1 year ago

Hello,

The date used the value from the input but created_at is the time on server. You can change the server timezone or if that's not possible, you can change the app timezone in /config/app.php

Thank you

0

Answered by Joan 1 year ago

Hi Mian,

The problem isnt the time zone, or locale. And I know this isnt a problem because when I try to edit the in/out I see the correct date in both vars, but the dates show in the "view" option isnt correct at all.

0

Answered by Mian Saleem 1 year ago

Hello,

I am sorry as I didn't understand.

You can only edit the date. There is no option to set/edit the created_at filed that will be set/updated on server only. The view will convert the server date to local machine timezone.

As I understand the date is working fine but he created_at is wrong, right? That is only possible if you have set the wrong app timezone. Laravel uses UTC timezone by default. You can edit config/app.php to change the timezone around line no 70

Thank you

0

Answered by Joan 1 year ago

Hi,

The variable "created_at" its perfect.

the problem is a visual bug.

See the attached file:

IMAGE1 show the report of the checkout with the variable DATE (10 july, wrong date), and CREATED AT perfect value!!

If you see this you can think that the error is a human error, but when I try to edit that checkout.. se What happen:

IMAGE2 show the correct DATE (07/11/2022).

The problem is the report of the checkin-checkout, show a wrong DATE (un day less than the real one).

Thanks.

0

Answered by Mian Saleem 1 year ago

Hello,

I will check the date display tomorrow morning and update you.

Thank you

0

Answered by Joan 1 year ago

perfect thanks!

0

Answered by Mian Saleem 1 year ago

Hello,

Yes, I can see the wrong date displayed in your images. Can you let me know your timezone?

Thank you

0

Answered by Mian Saleem 1 year ago

Hello,

Please let me know your timezone.

Thank you

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.