Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • thangnn1510 Friend
    #383514

    Dear brucewoland!

    <blockquote>DD/MM/YY format.</blockquote>

    – Please try Datlq’s suggest:

    <blockquote>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 Code:
    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 ;
    }
    And cahnge it to
    PHP Code:
    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 ;
    }
    I hope that would help ! </blockquote>

    <blockquote> i should change the data/time setting into Italian setting: 00:00 (24hours, NO pm and gmt)
    </blockquote>

    > Please go to templatesja_teline_ivblockstoolbar.php and change this code:

    [PHP] <?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>”;
    ?>[/PHP]

    to

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

    Regards!

    poseidan Friend
    #385852

    <em>@herb2586 214867 wrote:</em><blockquote>I did the same and am having the same problem.</blockquote>

    Same problem here as herb2586 and iboux… I am using Joomla 1.6 and my server settings are (“America/New_York”). I did everything presented here, unfortunately nothing seems to work!

    (Quote Originally Posted by iboux View Post
    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.)

    poseidan Friend
    #385855

    Ok it seems like I was able to have my expected settings:
    – The date shown at the left is coherent with the EST time zone
    – The day (ex: MON or LUN (in french)) is presented accordingly with the language file
    – The order is day/month/year

    Thanks to all for your help. 🙂

    [PHP]<?php
    /*
    # ————————————————————————
    # JA Teline IV
    # ————————————————————————
    # 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.comhttp://www.joomlancers.com
    # This file may not be redistributed in whole or significant part.
    # ————————————————————————
    */
    ?>

    <p class=”ja-day clearfix”>
    <?php
    date_default_timezone_set(“America/New_York”); // below time is in EST
    echo “<span class=”day”>”.JText::_(date (‘D’)).”</span>”;
    echo “<span class=”date”>”.JText::_(date (‘d’)).”</span>”;
    echo “<span class=”month”>”.JText::_(date (‘m’)).”</span>”;
    echo “<span class=”year”>”.JText::_(date (‘Y’)).”</span>”;
    ?>
    </p>

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

    <?php echo date(“H:i:s D”, time());?>

    <?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; ?>[/PHP]

Viewing 3 posts - 16 through 18 (of 18 total)

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

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