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
Added a method to get user timezone as DateTimezone instance #15007
Conversation
I have tested this item ✅ successfully on 99c9e47 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15007. |
I have tested this item ✅ successfully on 99c9e47 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15007. |
I have tested this item ✅ successfully on 99c9e47 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15007. |
RTC after 3 successful testes. |
@joomdonation was quicker than me. |
@franz-wohlkoenig No problem if there are more than two tests per PR :D |
thanks ;) |
@joomdonation if you test #15021 we have one more for RTC ;-) |
libraries/joomla/user/user.php
Outdated
* If the user didn't set a timezone, it will return the server timezone | ||
* | ||
* @return DateTimeZone | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a @since __DEPLOY_VERSION__
to the doc block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Summary of Changes
I added function to the JUser to get the user timezone, which is very useful for any developer working with date and time in Joomla.
It's a simple function, but it already simplifies some cumbersome library calls.
Testing Instructions
Fill and save any form field using calendar field with 'user_utc', like article publish date for example
Expected result
The date and time saved should be the set date and time...