User tests: Successful: Unsuccessful:
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)
This PR fixes the date/time in Versions Modal with Global Timezone setting, and if set User Timezone setting:
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.
Labels |
Added:
?
|
Ok, that code would be much better.
I'll try that later today, and will submit a new patch if it works.
Thanks!
Thanks @joomdonation, your code works fine!
Category | ⇒ | Administration |
Status | Pending | ⇒ | Ready to Commit |
Easy | No | ⇒ | Yes |
@test successful moving to RTC Thank you here!
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-17 11:20:30 |
Milestone |
Added: |
Thanks for testing
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
@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!
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.