PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Muffin
Client


Joined: Apr 10, 2004
Posts: 649
Location: UK

PostPosted: Sun Jun 06, 2004 2:55 pm Reply with quote Back to top

I think I've asked before but can't remember.

People can change the time in the forums, but how on earth do you get the right time to show on the rest of the site.

Statistics show up on my site in US time.

Here's my problem, my sites in the UK my servers in the US.

So common sense tells me that I can't change the server time for the rest of the site, right?
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sun Jun 06, 2004 4:08 pm Reply with quote Back to top

You are correct in your understanding. However, I picked this up in my travels and don't know for sure if it still works. Replace your function in mainfile.php with this one. Note the -15 ? That is the number of hours to offset. Let us know if this still works (or ever did Laughing )
Code:
function formatTimestamp($time) {
    global $datetime, $locale;
    setlocale (LC_TIME, $locale);
    ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
    $datetime = strftime(""._DATESTRING."", mktime(($datetime[4]-15),$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
    $datetime = ucfirst($datetime);
    return($datetime);
}
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Muffin
Client


Joined: Apr 10, 2004
Posts: 649
Location: UK

PostPosted: Sun Jun 06, 2004 6:00 pm Reply with quote Back to top

woohoo thanks Raven, I'll give it a go and let you know if it works.

watch this space lol


*edited*

It didnt work I've pm'd you the parse error I received.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sun Jun 06, 2004 7:38 pm Reply with quote Back to top

Before I even look at the PM, you need to make the overflow lines 1 long line. Try that. In other words, lines 4 and 5 should be one line and lines 6 and 7 should be one line.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Muffin
Client


Joined: Apr 10, 2004
Posts: 649
Location: UK

PostPosted: Thu Jun 10, 2004 11:26 am Reply with quote Back to top

Thanks Raven, I tried again without wordwrap on lol
and it still doesnt work.

The time here now is 18.31 and the hourly stats are showing 13.00 - 13.59

We're about 5hrs ahead of the server time, so the stats are always out. Sad

I've replaced my original mainfile now ............. sob!
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum