Skip to content
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

Merged
merged 2 commits into from Mar 31, 2017

Conversation

julienV
Copy link
Contributor

@julienV julienV commented Mar 30, 2017

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...

@phproberto
Copy link
Contributor

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.

@joomdonation
Copy link
Contributor

I have tested this item ✅ successfully on 99c9e47

Code review + write code JFactory::getUser()->getTimeZone(); to check the result. It is working as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15007.

@ghost
Copy link

ghost commented Mar 31, 2017

I have tested this item ✅ successfully on 99c9e47

Changed a given Date-Time-Format to user_utc give after saving Article same Date-Time-Format before saving.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15007.

@ghost
Copy link

ghost commented Mar 31, 2017

RTC after 3 successful testes.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 31, 2017
@ghost
Copy link

ghost commented Mar 31, 2017

@joomdonation was quicker than me.

@joomdonation
Copy link
Contributor

@franz-wohlkoenig No problem if there are more than two tests per PR :D

@julienV
Copy link
Contributor Author

julienV commented Mar 31, 2017

thanks ;)

@ghost
Copy link

ghost commented Mar 31, 2017

@joomdonation if you test #15021 we have one more for RTC ;-)

* If the user didn't set a timezone, it will return the server timezone
*
* @return DateTimeZone
*/
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rdeutz rdeutz merged commit 7e4b439 into joomla:staging Mar 31, 2017
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 31, 2017
@rdeutz rdeutz added this to the Joomla 3.7.0 milestone Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants