test melih
 melih
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • ithacaindy Friend
    #157852

    How do I change the “Last Update” time from GMT to EST?

    Ninja Lead Moderator
    #368715

    Hi ithacaindy,

    Open templatesja_teline_ivblockstopbar.php, clear all and paste this:

    <?php
    /*
    # ------------------------------------------------------------------------
    # JA Teline IV Template
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license - Copyrighted Commercial Software
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.com - http://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ------------------------------------------------------------------------
    */
    ?>

    <p class="ja-day clearfix">
    <?php
    echo "<span class="day">".date ('D')."</span>";
    echo "<span class="month">".date ('m')."</span>";
    echo "<span class="date">".date ('d')."</span>";
    echo "<span class="year">".date ('Y')."</span>";
    ?>
    </p>

    <p class="ja-updatetime"><span><?php echo JText::_('Last update')?></span><em>

    <?php //echo T3Common::getLastUpdate(); ?>

    <?php
    $gmt = T3Common::getLastUpdate();
    $gmt = str_replace(" GMT", "", $gmt);
    date_default_timezone_set("GMT");
    $timestamp = strtotime($gmt);
    date_default_timezone_set("America/New_York"); // below time is in EST
    $est = date("h:i:s A", $timestamp);
    echo $est." EST";
    ?>

    </em></p>

    <?php if($this->countModules('headlines')) : ?>
    <jdoc:include type="modules" name="headlines" />
    <?php endif; ?>

    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    You will have EST time.

    iboux Friend
    #369815

    <em>@hungnd 210989 wrote:</em><blockquote>Hi ithacaindy,

    Open templatesja_teline_ivblockstopbar.php, clear all and paste this:

    <?php
    /*
    # ------------------------------------------------------------------------
    # JA Teline IV Template
    # ------------------------------------------------------------------------
    # Copyright (C) 2004-2009 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
    # @license - Copyrighted Commercial Software
    # Author: J.O.O.M Solutions Co., Ltd
    # Websites: http://www.joomlart.com - http://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ------------------------------------------------------------------------
    */
    ?>

    <p class="ja-day clearfix">
    <?php
    echo "<span class="day">".date ('D')."</span>";
    echo "<span class="month">".date ('m')."</span>";
    echo "<span class="date">".date ('d')."</span>";
    echo "<span class="year">".date ('Y')."</span>";
    ?>
    </p>

    <p class="ja-updatetime"><span><?php echo JText::_('Last update')?></span><em>

    <?php //echo T3Common::getLastUpdate(); ?>

    <?php
    $gmt = T3Common::getLastUpdate();
    $gmt = str_replace(" GMT", "", $gmt);
    date_default_timezone_set("GMT");
    $timestamp = strtotime($gmt);
    date_default_timezone_set("America/New_York"); // below time is in EST
    $est = date("h:i:s A", $timestamp);
    echo $est." EST";
    ?>

    </em></p>

    <?php if($this->countModules('headlines')) : ?>
    <jdoc:include type="modules" name="headlines" />
    <?php endif; ?>

    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    You will have EST time.</blockquote>

    hi,
    i changed the code for EST time but the time it gives me is still 5 hours ahead. for example i’m in new york (est time) so when i do my updates at 1pm EST it should show 1pm on the site too right. but it show 6pm. what is wrong?
    thanks.

    roger_hohl Friend
    #370968

    Hi Guys

    I would like to have the european standard for Germany:

    Date -> DD/MM/YYYY
    Last Upate -> UTC/GMT +1h

    How can I set this?

    Roger

    Phan Gam Friend
    #371067

    <em>@roger_hohl 213878 wrote:</em><blockquote>Hi Guys

    I would like to have the european standard for Germany:

    Date -> DD/MM/YYYY
    Last Upate -> UTC/GMT +1h

    How can I set this?

    Roger</blockquote>

    Try the same way

    Open the file mentioned above, replace code
    echo T3Common::getLastUpdate();
    arround line 24 by code below:

    //echo T3Common::getLastUpdate();
    $gmt = T3Common::getLastUpdate();
    $gmt = str_replace(" GMT", "", $gmt);
    date_default_timezone_set("GMT");
    $timestamp = strtotime($gmt);
    date_default_timezone_set("Europe/Berlin"); // below time is in EST
    $est = date("h:i:s A", $timestamp);
    echo $est." GMT +01";

    Hope that helps

    herb2586 Friend
    #371750

    <em>@iboux 212413 wrote:</em><blockquote>hi,
    i changed the code for EST time but the time it gives me is still 5 hours ahead. for example i’m in new york (est time) so when i do my updates at 1pm EST it should show 1pm on the site too right. but it show 6pm. what is wrong?
    thanks.</blockquote>

    I did the same and am having the same problem.

    thangnn1510 Friend
    #372427

    Please change:

    date_default_timezone_set("America/New_York");

    with code for your timezone. The codes for time zone are listed in:

    http://www.php.net/manual/en/timezones.php

    Hope this helps.

    ali haydar Friend
    #375426

    Hi,
    how can I disable the tools


    1. tools
    emhc Friend
    #375851

    Hi Ali haydar,

    Sorry, can’t disable this tool because its not supported. So there is only one the only way to disable the tools is go to templatesja_teline_ivblockstopbar.php to delete or comment code from line 15 to line 25:

    [PHP]
    <p class=”ja-day clearfix”>
    <?php
    echo “<span class=”day”>”.date (‘D’).”</span>”;
    echo “<span class=”month”>”.date (‘m’).”</span>”;
    echo “<span class=”date”>”.date (‘d’).”</span>”;
    echo “<span class=”year”>”.date (‘Y’).”</span>”;
    ?>
    </p>

    <p class=”ja-updatetime”><span><?php echo JText::_(‘Last update’)?></span><em><?php echo T3Common::getLastUpdate(); ?></em></p>[/PHP]


    1. comment-code.
    ali haydar Friend
    #375914

    Hi hongnt98,

    Many thanks.

    jrensel Friend
    #376985

    Hi!

    I wonder: How to get 24hr time and not 12 hour ?

    Best from joe

    Sherlock Friend
    #377139

    Dear jrensel,

    That would need to hack on the T3v2 Core,you can try as following
    open the file of pluginssystemjat3corecommon.php

    Look for this 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]

    And cahnge it to
    [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”, $sec+$tz).” “;
    }
    return ;
    } [/PHP]

    I hope that would help !

    jaxartists Friend
    #382922

    <em>@thangnn1510 215768 wrote:</em><blockquote>Please change:

    date_default_timezone_set("America/New_York");

    with code for your timezone. The codes for time zone are listed in:

    http://www.php.net/manual/en/timezones.php

    Hope this helps.</blockquote>

    It’s already set to date_default_timezone_set(“America/New_York”);
    but it’s 6 hours ahead of New York/EST. – in Joomla admin, it’s set to to UTC-05:00 EASTERN TIME
    :confused:

    thangnn1510 Friend
    #383016

    <em>@jaxartists 229714 wrote:</em><blockquote>It’s already set to date_default_timezone_set(“America/New_York”);
    but it’s 6 hours ahead of New York/EST. – in Joomla admin, it’s set to to UTC-05:00 EASTERN TIME
    :confused:</blockquote>

    UTC-05:00 EASTERN TIME is time for timezone America/New York. Could you make your question more clearly?

    brucewoland Friend
    #383076

    i should change the data/time setting into Italian setting: 00:00 (24hours, NO pm and gmt) and DD/MM/YY format.
    Con you explain me hot to do that changes?
    Best regards!

Viewing 15 posts - 1 through 15 (of 18 total)

This topic contains 18 replies, has 14 voices, and was last updated by  poseidan 13 years, 10 months ago.

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