-
AuthorPosts
-
ithacaindy Friend
ithacaindy
- Join date:
- January 2010
- Posts:
- 335
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 20
- Thanked:
- 12 times in 1 posts
December 24, 2010 at 3:43 pm #157852How do I change the “Last Update” time from GMT to EST?
Ninja Lead Moderator
Ninja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 27, 2010 at 4:45 am #368715Hi 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.
1 user says Thank You to Ninja Lead for this useful post
January 3, 2011 at 10:43 am #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.January 9, 2011 at 9:15 pm #370968Hi Guys
I would like to have the european standard for Germany:
Date -> DD/MM/YYYY
Last Upate -> UTC/GMT +1hHow can I set this?
Roger
Phan Gam Friend
Phan Gam
- Join date:
- June 2008
- Posts:
- 216
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 39 times in 38 posts
January 10, 2011 at 8:23 am #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 +1hHow 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 helpsJanuary 13, 2011 at 10:29 pm #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
thangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
January 18, 2011 at 10:49 am #372427Please 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
ali haydar
- Join date:
- January 2010
- Posts:
- 37
- Downloads:
- 9
- Uploads:
- 13
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
February 7, 2011 at 6:50 pm #375426emhc Friend
emhc
- Join date:
- May 2008
- Posts:
- 68
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 10 times in 1 posts
February 9, 2011 at 9:51 am #375851Hi 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]
ali haydar Friend
ali haydar
- Join date:
- January 2010
- Posts:
- 37
- Downloads:
- 9
- Uploads:
- 13
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
February 9, 2011 at 8:34 pm #375914Hi hongnt98,
Many thanks.
jrensel Friend
jrensel
- Join date:
- December 2007
- Posts:
- 27
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
February 16, 2011 at 2:45 pm #376985Hi!
I wonder: How to get 24hr time and not 12 hour ?
Best from joe
Sherlock Friend
Sherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
February 17, 2011 at 10:15 am #377139Dear 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
jaxartists
- Join date:
- March 2008
- Posts:
- 37
- Downloads:
- 0
- Uploads:
- 4
- Thanked:
- 1 times in 1 posts
March 23, 2011 at 5:18 pm #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
thangnn1510
- Join date:
- October 2014
- Posts:
- 1608
- Downloads:
- 0
- Uploads:
- 80
- Thanks:
- 73
- Thanked:
- 278 times in 256 posts
March 24, 2011 at 8:52 am #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?
March 24, 2011 at 3:14 pm #383076i 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! -
AuthorPosts
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