? Success

User tests: Successful: Unsuccessful:

avatar pe7er
pe7er
17 Jan 2015

Fix to correct date/time in Versions modal which displays the Version UTC date/time directly from the database, and does not correct it with Server Time Zone and/or User Time Zone.

Test:

  • Configure different Time Zone settings for Server & User (to notice differences from UTC timezone that is used in Joomla's database)
    Local Server Time: Sat 2015-01-17 00:48 (UTC+1)
    System > Global Configuration > Server Time Zone: e.g. Amsterdam (= UTC+1)
    Users > User Manager > select user account > Basic Settings > e.g. New York (= UTC-5)

  • Create an article, and change it
    Content > Article Manager > New > "Some title" > Save
    Created Date = 2015-01-16 18:48:48 ( -> displayed in Timezone of User)

Changed Article a bit > Save
Created Date = 2015-01-16 18:48:48 (= UTC-5)
Modified Date = 2015-01-16 18:50:44 (= UTC-5)

In database the article is stored in UTC time:
created: 2015-01-16 23:48:48 ( = UTC time)
modified: 2015-01-16 23:50:44 (= UTC time)
edit article- database times

  • Use [Versions] button to see the date/time in Versions Modal. In Versions the time is displayed as UTC time: current version: 2015-01-16 23:50:44 ( = UTC time, directly from database) 1st version 2015-01-16 23:48:48 ( = UTC time, directly from database) edit article versioning error

This PR fixes the date/time in Versions Modal with Global Timezone setting, and if set User Timezone setting:

edit article- database times-fixed

Note: I have added this PR before: #3355
I could not correct it in the model /administrator/components/com_contenthistory/models/history.php and therefore correcting it in the view seems like the best alternative.

avatar pe7er pe7er - open - 17 Jan 2015
avatar jissues-bot jissues-bot - change - 17 Jan 2015
Labels Added: ?
avatar joomdonation
joomdonation - comment - 17 Jan 2015

I haven't tried but I think we can use Joomla built-in JHtml::_('date') method to display the date (this method does allows us to covert from UCT timezone to user or server timezone)

echo JHtml::_('date', $item->save_date, 'Y-m-d H:i:s'); should give same result.

avatar pe7er
pe7er - comment - 17 Jan 2015

Ok, that code would be much better.
I'll try that later today, and will submit a new patch if it works.
Thanks!

avatar pe7er
pe7er - comment - 17 Jan 2015

Thanks @joomdonation, your code works fine!

avatar joomdonation
joomdonation - comment - 17 Jan 2015

Thanks Peter.

@test: Success. Before patch, the system display time in UTC timezone. After patch, the system display time in User/Server timezone.

avatar zero-24 zero-24 - alter_testresult - 17 Jan 2015 - pe7er: Tested successfully
avatar zero-24 zero-24 - alter_testresult - 17 Jan 2015 - pe7er: Not tested
avatar zero-24 zero-24 - alter_testresult - 17 Jan 2015 - joomdonation: Tested successfully
avatar zero-24 zero-24 - change - 17 Jan 2015
Category Administration
avatar zero-24 zero-24 - change - 17 Jan 2015
Status Pending Ready to Commit
Easy No Yes
avatar zero-24
zero-24 - comment - 17 Jan 2015

@test successful moving to RTC Thank you here!


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

avatar zero-24 zero-24 - test_item - 17 Jan 2015 - Tested successfully
avatar roland-d roland-d - close - 17 Jan 2015
avatar roland-d
roland-d - comment - 17 Jan 2015

Merged with commit 2b5f285

avatar roland-d roland-d - close - 17 Jan 2015
avatar roland-d roland-d - change - 17 Jan 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-01-17 11:20:30
avatar roland-d roland-d - change - 17 Jan 2015
Milestone Added:
avatar pe7er
pe7er - comment - 17 Jan 2015

Thanks for testing

avatar pe7er pe7er - head_ref_deleted - 5 Nov 2015
avatar mostafa87us
mostafa87us - comment - 28 Jan 2016

Hello,

Please i have problem related to the same issue

time zone is okay in back-end but in front end not working well.

for example:

i am working with timezone africa/cairo

when i check time as visitor in front end i found it not giving me right time.

so can you please help me in that.

Regards


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

avatar pe7er
pe7er - comment - 28 Jan 2016

@mostafa87us This PR fixed an issue with the time display in Versioning in the back-end of Joomla 3.4.0. This issue has been closed.

If you have a problem with time display in the current version of Joomla 3.4.8,
and you are able to reproduce it with a clean installation of Joomla 3.4.8,
then please create a new issue for it.

Or use http://forum.joomla.org/ to get technical assistance. Please include all necessary information, e.g. Joomla version, and what steps you did to reproduce the error.

Thanks!

Add a Comment

Login with GitHub to post a comment