? Success

User tests: Successful: Unsuccessful:

avatar ron4mac
ron4mac
22 Jun 2014

joomlacode tracker 33881

avatar ron4mac ron4mac - open - 22 Jun 2014
avatar gwsdesk
gwsdesk - comment - 25 Jun 2014

@test
This does not work for me. I have set in the profile the timezone to NY and entered date of 04-07-1991 in admin backend. It shows in front indeed 03-07-1991
After patching this with the proposed solution i changed in admin backend date to 06-07-1991 and in frontend it still shows one day behind i.e.05-07-1991

Leo

avatar Bakual
Bakual - comment - 25 Jun 2014

There is not really support for filter="none". You either have to use filter="server_utc" or filter="user_utc". The user one is the default.
The thing is that Joomla always stores the date and times as UTC in the database. And calculates it back to the requested timezone when showing the data, giving localised date/time to the user.
In case of a birthdate this of course doesn't make much sense. There you should use the "server_utc" filter which means it's stored and shown based on the server timezone as set in the global configuration. Not changing depending on user settings.

However the problem in this case isn't the filter. It's the fact that the date is stored as date only without the time. When Joomla changes it to UTC it changes the time part according to timezone. But that part is thrown away by the plugin when it saves the date. This isn't a problem as long as you are in Europe, but it is a problem in America due to the nature of the timezones :smile:

Thus filter="none" may work in the backend as kind of an unsupported hack, but it fails again in each other instance where the date will be shown. Because there Joomla still applies the timezone.
We better fix it by saving the whole datetime instead of only the date.

avatar gwsdesk
gwsdesk - comment - 25 Jun 2014

I understand what you write but I am not capable to make the changes as you know probably. I do test so as soon this is patched I will test again..... (back in my cage ;-) )

avatar Bakual
Bakual - comment - 25 Jun 2014

The comment was more targeted at @ron4mac

avatar roland-d
roland-d - comment - 11 Jul 2014

Can the PR be updated with the proposed change, so we can test it? Thanks.

avatar roland-d
roland-d - comment - 16 Jul 2014

I have created a new PR (#3910) that handles the storing of datetime of the DOB and set the filter to server_utc.

avatar gwsdesk
gwsdesk - comment - 16 Jul 2014

@test Roland I have set to NY server time, birthdate 2nd July and in editing it shows 1 july for birthday..... I have changed the 2 files with the patch and I still have the 1 July

avatar infograf768
infograf768 - comment - 20 Jul 2014

Closing as #3910 works fine

avatar infograf768 infograf768 - change - 20 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-20 07:59:44
avatar infograf768 infograf768 - close - 20 Jul 2014
avatar infograf768 infograf768 - close - 20 Jul 2014
avatar ron4mac ron4mac - head_ref_deleted - 11 Oct 2014

Add a Comment

Login with GitHub to post a comment