User tests: Successful: Unsuccessful:
As explained in #7657 we have an issue with the date of birth being shown as the wrong day if the timezone of the server is set to a positive value (eg Moscow).
Joomla always stores the dates in UTC and calculates them back when showing. Meaning when you set your server timezone to Moscow, it will subtract 3 hours from the date when saving, storing it as the day before at 9pm. When showing again, it should add those three hours again which brings us back to the day we saved.
This PR fixes the part when showing the date and applies the correct timezone there. Currently the value is just shown as it was stored in the database.
As an additional advantage we can now specify the format of the date, which usually for date of births is only the date part. Usually nobody is interested in the actual time of birth.
Test with entering the date of birth while the timezone is on a positive or on a negative timezone. Both should work. Also test with changing the user timezone, that one should have no impact at all.
You will probably notice that the date of birth may change when you change the server timezone. That is expected as all already stored values will be wrong if you change the server timezone after the data is saved.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
If the server time zone is changed, contrary to #7657, the dob may change. Although it is to be expected for all usual items and has little impact there, in that case it is rather weird.
Yes, if someone changes the server timezone after a date has been saved, it may change. I wrote that in the PR already and it is expected behavior.
Btw: your PR would change the date likely for all as well, since you basically change the timezone to UTC for all installs.
You use 2 different formats when rendering the date: DATE_FORMAT_LC4 and DATE_FORMAT_LC1
I do, yes. In the profile one I used the same format that is used for other calendar fields. I think it makes sense to be consistent.
For the contact one I used the one you have chosen in your PR.
Category | ⇒ | Components Front End Plugins |
Easy | No | ⇒ | Yes |
OK here.
Milestone |
Added: |
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-08-24 08:15:42 |
Closed_By | ⇒ | Kubik-Rubik |
Labels |
Removed:
?
|
2 remarks:
1. If the server time zone is changed, contrary to #7657, the dob may change. Although it is to be expected for all usual items and has little impact there, in that case it is rather weird.
2. You use 2 different formats when rendering the date: DATE_FORMAT_LC4 and DATE_FORMAT_LC1