edit your user profile
save
display the user profile
so for instance you putted in 1972-06-09
the profile then displayes thursday 08 june 1972
PHP Version 5.3.25
joomla 3.3.6
nb why is the way of input not selectable? so change from yyyy/mm/dd(us) to dd/mm/yyyy(eu)
We have had this many times before and it has always been down to the server timezone
Status | New | ⇒ | Information Required |
Right now, the Date of birth field used SERVER_UTC filter and it cause the issue when user timezone is different from server timezone.
To solve this issue, I think we can change the field to use USER_UTC filter. To do that, just change filter="server_utc" in this line https://github.com/joomla/joomla-cms/blob/staging/plugins/user/profile/profiles/profile.xml#L110
To filter="user_utc"
Could you test it?
user_utc almost certainly is wrong. That would mean there is a different date shown for each user depending on their settings.
The date should always be stored and shown both based on the server timezone.
The issue most likely is that it is shown based on the user timezone, and not based on the server timezone.
Hello Brian and Thomas,
thank you for your reply.
I see that the server time zone is set to Amsterdam.
Were exactly can i find the other one for the user? Can't find it this
quick.
Thank You!
Brian Teeman schreef op 3-2-2015 om 11:27:
We have had this many times before and it has always been down to the
server timezone
_This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at
issues.joomla.org/joomla-cms/5954
http://issues.joomla.org/tracker/joomla-cms/5954.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Hello,
ok found the user setting.
So now both back-end and user are on Amsterdam.....issue remains
I will try when front end parameters are off.
Thomas Hunziker schreef op 3-2-2015 om 18:26:
user_utc almost certainly is wrong. That would mean there is a
different date shown for each user depending on their settings.
The date should always be stored and shown both based on the server
timezone.The issue most likely is that it is shown based on the user timezone,
and not based on the server timezone.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Ok set the server time zone on UTC.
Now it is ok.
And it seems to make no difference at all where the front-end user
setting is set to.
Seems like the front-end setting has totally no influnce/ or is not working
Strange
But thanks!
Maybe you know why the front end setting makes no difference ?
Thomas Hunziker schreef op 3-2-2015 om 18:26:
user_utc almost certainly is wrong. That would mean there is a
different date shown for each user depending on their settings.
The date should always be stored and shown both based on the server
timezone.The issue most likely is that it is shown based on the user timezone,
and not based on the server timezone.—
Reply to this email directly or view it on GitHub
#5954 (comment).
All I know is that Joomla stores dates as UTC in the database. That means it takes the date from the form and adjusts the timezone from the server or user settings (depends on code) to UTC. Then it stores the date. When it's shown again on a page, it again applies the timezone shift depending on the requested timezone (server or suer, depends on code).
That usually works fine when we are talking about date/time constructs. It can be a bit funny when we only have the date part, and especially for birthdays where you don't want to have the date adjusted to timezones. So this may be the issue here.
However I haven't looked at the specific code and can't say you why it fails exactly in this case.
Thank you Thomas for your reply.
ok no problem.
At least you cleared it up how it is stored, so i understand.
It's working ok now in this way, so i leave it for now.
Thanks!
Thomas Hunziker schreef op 3-2-2015 om 22:24:
All I know is that Joomla stores dates as UTC in the database. That
means it takes the date from the form and adjusts the timezone from
the server or user settings (depends on code) to UTC. Then it stores
the date. When it's shown again on a page, it again applies the
timezone shift depending on the requested timezone (server or suer,
depends on code).
That usually works fine when we are talking about date/time
constructs. It can be a bit funny when we only have the date part, and
especially for birthdays where you don't want to have the date
adjusted to timezones. So this may be the issue here.However I haven't looked at the specific code and can't say you why it
fails exactly in this case.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-03 22:33:39 |
Closed_By | ⇒ | brianteeman |
Closed_Date | 2015-02-03 22:33:39 | ⇒ | 2015-02-03 22:33:40 |
@Bakual : user_utc is correct. When we set it to user_utc
The date user choose will be stored in database in UTC timezone
Then when it is displayed again, it will be displayed in that user timezone. So it is correct.
I have looked at the code and I almost certain that it works.
Settings server timezone to UTC will solve the issue, yes, but it will not solve this issue completely because many websites will have timezone set to different timezone, and this issue will still happen with other sites.
To solve this issue completely, we need to set filter to user_utc like I mentioned before. The date will be displayed correctly and not depends on server timezone settings of the site anymore.
Well, i don't completely understand why the option is there to change
the server time zone in back-end, when Joomla always stores it in UTC.
Why is it then not a fixed value in backend?
Tuan Pham Ngoc schreef op 4-2-2015 om 0:25:
Settings server timezone to UTC will solve the issue, yes, but it will
not solve this issue completely because many websites will have
timezone set to different timezone, and this issue will still happen
with other sites.To solve this issue completely, we need to set filter to user_utc like
I mentioned before. The date will be displayed correctly and not
depends on server timezone settings of the site anymore.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Well, i don't completely understand why the option is there to change
the server time zone in back-end, when Joomla always stores it in UTC.
Why is it then not a fixed value in backend?
Because server timezone may be different from UTC and dates created by PHP (like current date and the like) would be calculated wrong then.
Also in Dutch there is another bug, there is a line displayed which
should not be there.
This line is visible on the page where you edit the profile, but is also
displayed when just viewing the profile
it is displayed above the line date of birth (Geboortedatum:) and behind
it the date
Tuan Pham Ngoc schreef op 4-2-2015 om 0:25:
Settings server timezone to UTC will solve the issue, yes, but it will
not solve this issue completely because many websites will have
timezone set to different timezone, and this issue will still happen
with other sites.To solve this issue completely, we need to set filter to user_utc like
I mentioned before. The date will be displayed correctly and not
depends on server timezone settings of the site anymore.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Ok thank you !
Thomas Hunziker schreef op 4-2-2015 om 12:00:
Well, i don't completely understand why the option is there to change the server time zone in back-end, when Joomla always stores it in UTC. Why is it then not a fixed value in backend?
Because server timezone may be different from UTC and dates created by
PHP (like current date and the like) would be calculated wrong then.—
Reply to this email directly or view it on GitHub
#5954 (comment).
Labels |
Added:
?
|
What timezone do you have set for your server and your user?