test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • herb2586 Friend
    #152315

    Is it possible to change the timezone from GMT to ET in the module that is in the upper left hand corner that says LAST UPDATE?

    gray Friend
    #349077

    In Teline 1.4.1 the date is returned by the function
    [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]
    As you can see, the date is formatted by gmdate PHP function. Try to replace it with date function, instead of
    return gmdate(“h:i:s A”, $sec+$tz).’ GMT’;
    put
    return date(“h:i:s A”, $sec+$tz).’ ET’;

    Or try to use alternative LastUpdate function created by me.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  gray 14 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum