Same date field, different date shown for different users

This one is pretty strange,

There is this panel page with a date field. This is a regular date field:

  fecha_inicio:
    label: Fecha inicio
    type: date
    width: 1/4
    translate: false

When user A access the page the date field shows 2020-02-21.
When I access the same page the exact same date field shows 2020-02-22.
We triple checked.

Additionally, the user sees the same behaviour in different computers, and across two different servers.

Even more strangely in the frontend we both see the same date (2020-02-22) This is the code that shows that date:

<?= $page->fecha_inicio()->toDate('%e de %B') ?>

And, yes, I’ve changed the date handler in my config to strftime:

'date.handler' => 'strftime',

It is perhaps noteworthy to mention that I am in Spain and this user is in México, but I fail to see how should this affect the panel date field, but not the frontend date.

Any help to make sense of this would be greatly appreciated.

Thank you

What is actually stored int he content file?

There are some issue reports on GitHub, at least one of them is still open.

Maybe you can also fix it by setting the time zone.

This is happening in several or all pages, actually. And it seems in all cases the content file shows the date I see in the panel, and the one that is shown in the frontend, not the one that the user sees.

So, for this particular page, the date in the content file is

image

Regarding the Github issue, I believe my case is different in that if I change the date, it changes correctly in the text file, shows correctly in the date field, and reflects correctly in the frontend. But the user still sees one day less in the date field.

So, the most evident symptom is that in the panel’s date field, the user consistently sees one day less than the day stored in the text file

If the user selects day 22 in the date field, it shows 23 in the text file and frontend. If the user selects 23, it shows 24 in the text file and frontend, etc.

Btw, should changing the date handler affect in any way date fields in the panel ? Will the panel start using strftime internally aswell?

Thank you

Have you tried to set the time zone?

In any case, there were other issue reports regarding the date field, and I thought this issue had been fixed.

I’ll try to find it… This here:

What Kirby version are you using?

1 Like

Good call, this installation is not up-to-date.

And that second issue looks like it could be related.

I should’ve started updating.

Will report back.

thank you