-
AuthorPosts
-
icbl Friend
icbl
- Join date:
- December 2010
- Posts:
- 242
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 86
- Thanked:
- 7 times in 1 posts
December 29, 2010 at 8:33 pm #158044I 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?
ThanksNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 30, 2010 at 8:05 am #369305Hi 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.
December 30, 2010 at 11:05 am #369345hi
I want to do the same work,but I don’t know how change the php code. please guide me
regardsNinja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 30, 2010 at 2:09 pm #369362hi all,
here is the code to replace:
<?php echo date("H:i:s D", time());?>
icbl Friendicbl
- Join date:
- December 2010
- Posts:
- 242
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 86
- Thanked:
- 7 times in 1 posts
December 30, 2010 at 6:34 pm #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 ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
December 30, 2010 at 6:51 pm #369402Simply 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 Friendicbl
- Join date:
- December 2010
- Posts:
- 242
- Downloads:
- 0
- Uploads:
- 28
- Thanks:
- 86
- Thanked:
- 7 times in 1 posts
December 30, 2010 at 7:09 pm #369406Hi,
When I put that code it works but whole web site’s fonts becoming ITALIC!
December 30, 2010 at 8:41 pm #369423hi 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.
regardsPhill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
December 30, 2010 at 10:20 pm #369428This 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 Friendkadad
- Join date:
- August 2010
- Posts:
- 129
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 16
- Thanked:
- 1 times in 1 posts
January 1, 2011 at 5:14 pm #369596Thanx for your tips but it seems to show local time of the host and not my time zone.
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
January 3, 2011 at 1:11 pm #369842If 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()******);?>
1 user says Thank You to Phill for this useful post
-
AuthorPosts
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