-
AuthorPosts
-
splico123 Friend
splico123
- Join date:
- January 2007
- Posts:
- 339
- Downloads:
- 80
- Uploads:
- 7
- Thanks:
- 24
- Thanked:
- 93 times in 16 posts
January 22, 2011 at 11:22 pm #159139Hey guys, just a question if anyone is interested in solving this, i have been using a hack for the time for latest update and i want following:
in the latest update i want to show the date (d m Y) and Time (H:i) for my latest MODIFIED article.
the problem is that i want to use server time which shows correctly on modified date under certain article but on front page it shows UTC time which is -1hour for me… timezone in Joomla config has been set to +1 and article modified dates show correctly just on frontend it shows it still in GMT.
can anyone solve this?
EDIT: No answer yet from anyone?
splico123 Friendsplico123
- Join date:
- January 2007
- Posts:
- 339
- Downloads:
- 80
- Uploads:
- 7
- Thanks:
- 24
- Thanked:
- 93 times in 16 posts
January 25, 2011 at 12:02 am #373588Ayone did this yet?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
January 26, 2011 at 3:59 am #373817dear,
could you be more specific about on what module the issue occur? and please provide your site link.
February 1, 2011 at 10:46 am #374713if i understand correctly, this person wants the Last update box in the upper left area to show in his local time as opposed to GMT. i have the same problem. i have set my global config to EST, but the Last update time still shows as GMT. did anyone figure this out? see attached.
thanks.
<em>@splico123 216834 wrote:</em><blockquote>Hey guys, just a question if anyone is interested in solving this, i have been using a hack for the time for latest update and i want following:
in the latest update i want to show the date (d m Y) and Time (H:i) for my latest MODIFIED article.
the problem is that i want to use server time which shows correctly on modified date under certain article but on front page it shows UTC time which is -1hour for me… timezone in Joomla config has been set to +1 and article modified dates show correctly just on frontend it shows it still in GMT.
can anyone solve this?
EDIT: No answer yet from anyone?</blockquote>
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 8, 2011 at 8:05 am #375553<em>@RParks 218830 wrote:</em><blockquote>if i understand correctly, this person wants the Last update box in the upper left area to show in his local time as opposed to GMT. i have the same problem. i have set my global config to EST, but the Last update time still shows as GMT. did anyone figure this out? see attached.
thanks.
</blockquote>
Ok, you need make a customization to resolve the issue:
1) open the file: pluginssystemjat3corecommon.php and find the following code:
[PHP]
function getLastUpdate(){
$db = &JFactory::getDBO();
$query = ‘SELECT created FROM #__content a ORDER BY created DESC LIMIT 1’;
$db->setQuery($query);
$data = $db->loadObject();
if( $data->created ){ //return gmdate( ‘h:i:s A’, strtotime($data->created) ) .’ GMT ‘;
$date =& JFactory::getDate(strtotime($data->created));
$user =& JFactory::getUser();
$tz = $user->getParam(‘timezone’);
$sec =$date->toUNIX(); //set the date time to second
return gmdate(“h:i:s A”, $sec+$tz).’ GMT’;
}
return ;
}
[/PHP]replace:
[PHP]
function getLastUpdate(){
$db = &JFactory::getDBO();
$config = &JFactory::getConfig();
$offset = $config->getValue(‘config.offset’);
$query = ‘SELECT created FROM #__content a ORDER BY created DESC LIMIT 1’;
$db->setQuery($query);
$data = $db->loadObject();
if( $data->created ){ //return gmdate( ‘h:i:s A’, strtotime($data->created) ) .’ GMT ‘;
$date =& JFactory::getDate(strtotime($data->created));
$sec =$date->toUNIX(); //set the date time to second
return gmdate(“h:i:s A”, $sec+$offset).’ GMT’;
}
return ;
}
[/PHP]2) when done you access the global configuration to change your timezone
THanks
AuthorPostsViewing 5 posts - 1 through 5 (of 5 total)This topic contains 5 replies, has 4 voices, and was last updated by Saguaros 13 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Latest update time
Viewing 5 posts - 1 through 5 (of 5 total)