-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar Today: Items wrongly set to pending #17823
The head ref may contain hidden characters: "\u00A7staging-cal-field-inconsistency"
Calendar Today: Items wrongly set to pending #17823
Conversation
I have tested this item ✅ successfully on 3f3d1a5 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17823. |
The screenshot in #17770 explains how to test. This is an old bug that been there for ever. Someone may not remark the bug when the local computer time zone is set to UTC or UTC-# Anyone will experience the bug when the local computer is set to UTC+# |
I have tested this item ✅ successfully on 3f3d1a5 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17823. |
rtc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17823. |
RTC after two successful tests. |
Actually, I think this issue is not a code issue. It happens because of a wrong user setting. For the calendar (and other date processing) and its UTC conversion to work properly, the user timezone obviously needs to be set to the timezone of the user. Otherwise the server will not know how to convert the datetime properly and it will off by some hours. In my testing, I only could reproduce the issue when I had set my user timezone to a different than my real timezone "Zurich". Eg setting it to "New York" will produce the effect in my case because I input my local time but the server will interpret it as the time in New York and thus it will be 6 hours "later". |
Pull Request for Issue #17770 .
Summary of Changes
@infograf768 i think 3.x has some extra code for the user_utc compared to 2.x.
I think it's these lines:
joomla-cms/libraries/joomla/form/fields/calendar.php
Lines 247 to 248 in a444c14
We always read the input as UTC and convert it to server or user but the user submitted the date with their local timezone (most of the times the browser will have the timezone to the area that the user is living). There is the inconsistency...
this should run only when the code is coming from the db, for the data that comes from a form input we need to convert it to UTC. That will fix the problem
Testing Instructions
check #17770
Expected result
Dates are set correctly
Actual result
Dates are set correctly
Documentation Changes Required
No