Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • icbl Friend
    #158044

    I would like to change the last update time at the top of the template to my local time zone, how can I do this? In addition is it possible to make time adjusted to user’s time zone? If yes , how?
    Thanks

    Ninja Lead Moderator
    #369305

    Hi icbl,

    The time is fixed with GMT and our devs are considering to make it configurable, maybe we will update this into jat3. For the time being, you can edit this file : templatesja_socialblockstopbar.php, try replace this:

    <?php echo T3Common::getLastUpdate(); ?>
    with another snippet, I assume you know how to show time using PHP.

    Regards.

    yadesafar Friend
    #369345

    hi
    I want to do the same work,but I don’t know how change the php code. please guide me
    regards

    Ninja Lead Moderator
    #369362

    hi all,
    here is the code to replace:

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

    icbl Friend
    #369398

    <em>@hungnd 211746 wrote:</em><blockquote>Hi icbl,

    The time is fixed with GMT and our devs are considering to make it configurable, maybe we will update this into jat3. For the time being, you can edit this file : templatesja_socialblockstopbar.php, try replace this:

    <?php echo T3Common::getLastUpdate(); ?>
    with another snippet, I assume you know how to show time using PHP.

    Regards.</blockquote>

    Could you give more info please as a newbie I do not know.

    Thanks

    Phill Moderator
    #369402

    Simply open the file templatesja_socialblockstopbar.php with notepad and replace the line


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

    with this


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

    icbl Friend
    #369406

    Hi,

    When I put that code it works but whole web site’s fonts becoming ITALIC!

    yadesafar Friend
    #369423

    hi phill
    I changed the code and I see current time now,but the time dosen’t change untill I refresh the page. I’d like to show the current time without refreshing the page.
    regards

    Phill Moderator
    #369428

    This was never meany as a live clock, that would require a far more complex script. If you wish to have that you would have to find some code and adapt it to your needs.

    Here is one suitable script – http://shearersoftware.com/software/web-tools/clock/

    kadad Friend
    #369596

    Thanx for your tips but it seems to show local time of the host and not my time zone.

    Phill Moderator
    #369842

    If you want to read the locale of a user and then display that would be a far more complex script. The original idea of this was not to show the time but to show when the site was last updated. If you want a clock then this template does not really support that and you would need to code it yourself by adding a script such as the one I linked to above. Looking at most news sites around the world they also just show the last updated time as that is the important one for news stories. It is also difficult to accurately read where a user is in the world. Finally, we all have a clock on our computers don’t we?

    It is however simple to set a particular time zone but that would a fixed to the owners preference. Just use the code below but replace the ***** in red with the offset in seconds. For example, if you used +25200 that would be plus 7 hours from the server time. Make sure you add a + or – to the number of seconds.

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

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

This topic contains 11 replies, has 5 voices, and was last updated by  Phill 13 years, 10 months ago.

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