Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • sitebabu Friend
    #149010

    I installed teline iii for my site. I want to set the date & day as Indian time zone.
    But it is not showing so. However thru admin, I set the time zone as Indian.
    My server is at USA.

    Help me ……

    Anonymous Moderator
    #334005

    Hi sitebabu

    I think the date works fine if you configure in administrator. You should try to delete all caches from Joomla and browser and check your website again.

    Also, you can refer this link http://www.joomlart.com/forums/topic/how-to-modify-date/ . There are a lot of questions about setting the date in Teline iii

    Hope it helps

    bwyatt Friend
    #341386

    JA Developer; the question asked concerns the “time zone” not the date. I combed the forum and visited the link you’ve provided several times, but I haven’t found an answer to this question yet.

    Let me phrase it this way: Is there a way to display the “last update” time in my timezone rather than in GMT? If so, how?

    Anonymous Moderator
    #341705

    Hi you

    Please use this function: http://php.net/manual/en/function.date-default-timezone-set.php

    You put it in index.php file.

    bwyatt Friend
    #341706

    Thanks for the link, but the code is a little above my paygrade. Could you be more specific? Exactly what goes in the index.php file and where? An example would be most helpful.

    Anonymous Moderator
    #341930

    Please try to use this code at the top of index.php:

    date_default_timezone_set(“Asia/Kolkata”);

    bwyatt Friend
    #341951

    Is there a default time zone already coded somewhere in the template? When I offset my time by my server’s time the time that appears is way off.

    Anonymous Moderator
    #342734

    Hi bwyatt

    I don’t understand your issue

    in administrator, you can go to Site -> Global Configuration to configure your time zone

    could you let me know in detail your issue?

    bwyatt Friend
    #342740

    The time that appears in the template is not what is set in the configured time zone under Global Configuration. I was wondering if the default time zone was redefined somewhere in the template coding, although I can’t imagine why this would be done.

    sitebabu Friend
    #343677

    I tried it but not success.
    Template is teleine iii.
    Now I want to disable the day & date showing at top left corner.
    Guide me.
    Thank you in advance.

    Saguaros Moderator
    #343869

    Dear sitebabu!

    Here is the solution for you

    Pls open the file: ja_teline_iii/libs/ja.template.helper.php you can find this code:
    [PHP] return gmdate(“h:i:s A”, $sec+$tz).’ GMT’;[/PHP]
    if you display follow to your timezone:
    and replace:
    [PHP]
    $tz=5*3600; // 5:is timezone of india
    return gmdate(“h:i:s A”, $sec+$tz).’ GMT’;
    [/PHP]

    Good luck

    gabros Friend
    #344896

    Hello,

    What should I do to display the time in 24 hours format? Instead of 02:34:21 PM I’d like to display it like 14:34.

    Many thanks!

    Saguaros Moderator
    #345441

    Dear gabros!

    Here is the solution:
    replace:
    [PHP] return gmdate(“h:i:s A”, $sec+$tz).’ GMT’; [/PHP]

    By:
    [PHP] return gmdate(“H:i:s “, $sec+$tz).’ GMT’; [/PHP]

    Goodluck

    hush Friend
    #370908

    Hi tienhc,

    Thank you very much for the great tip. Can u pls advice how to fix this in ja_teline_iii V2 ?
    Waiting for prompt reply.

    Tks

    Saguaros Moderator
    #371023

    <em>@hush 213790 wrote:</em><blockquote>Hi tienhc,

    Thank you very much for the great tip. Can u pls advice how to fix this in ja_teline_iii V2 ?
    Waiting for prompt reply.

    Tks</blockquote>

    You open the file : pluginssystemjat3corecommon.php and you modify at 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]

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

This topic contains 16 replies, has 7 voices, and was last updated by  corinaw 13 years, 8 months ago.

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