modxcms / revolution

MODX Revolution - Content Management Framework
https://modx.com/
GNU General Public License v2.0
1.36k stars 529 forks source link

[3.x] Schedule Unpublish Date is not correct #16100

Open Semdevmaster opened 2 years ago

Semdevmaster commented 2 years ago

Bug report

Summary

If the resource does not specify the date of removal from publication, then the incorrect date is shown in the schedule image

Expected behavior

Must be either empty field or value - not set

Environment

MODX v3

JoshuaLuckers commented 2 years ago

I can't replicate this issue, can you provide the steps to reproduce the issue?

And did you test with the latest nightly or release candidate 2?

Semdevmaster commented 2 years ago

It looks like I found a problem, it is relevant when there is no corresponding locale in the system. For example, if the locale is set in php.ini as Europe/Berlin, but it is not in the system, for example, in alpine linux, by default. If the corresponding locale is added to the system, the error disappears. I'm not sure how good it is to rely on the presence of the desired locale in the system, most distributions have them in full, but sometimes this is not the case. Maybe it makes sense to use the PHP extension - Intl (Internationalization Functions)?

JoshuaLuckers commented 2 years ago

@Semdevmaster Thanks for looking further into this!

Did it save the wrong value into the database or is it only a displaying issue?

Good suggestion to look into the Intl extension for PHP. To discuss this further I would like to refer you to issue #15864

Semdevmaster commented 2 years ago

This is only a displaying issue, database is ok