Author |
Message |
Sylver Cheetah 53 Board Member
Joined: 17 Dec 2008
Posts: 426 Location: Milky Way
|
Posted: Sat Jul 10, 2010 7:29 am Post subject: My forum is unsync (Wrong time...) |
|
|
Hi!
My forums is not sync with the internet time. For example, if I post a message at 10:00 am, it will show up as posted at 9:47 am (aproximatively).
Doesn anyone know where to change the board's time? Not time zone, I know that, this is something else...
Thanks!
Daniel, Romania _________________ Image link
My Forum || My Blog
phpBB2 forever! |
|
Back to top |
|
|
sbourdon Board Member
Joined: 26 Mar 2009
Posts: 8
|
Posted: Sat Jul 10, 2010 7:55 am Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Hello,
If I'm not mistaking, the board time being displayed is the one from your host. That's why you can only set your timezone, not the actual time...
Of course, if you host your site on your own computer, you can simply fix that by setting your PC clock to the correct Internet time!
Hope this helps! |
|
Back to top |
|
|
Sylver Cheetah 53 Board Member
Joined: 17 Dec 2008
Posts: 426 Location: Milky Way
|
Posted: Sat Jul 10, 2010 8:06 am Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Hi and thanks for the reply!
I'm hosted on a canadian server. Isn't there any trick I can do to make the board take the time from somewhere else and not the server? _________________ Image link
My Forum || My Blog
phpBB2 forever! |
|
Back to top |
|
|
sbourdon Board Member
Joined: 26 Mar 2009
Posts: 8
|
Posted: Sat Jul 10, 2010 8:33 am Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Hi,
OK, I can confirm that your server's time is wrong: see FAQ 11 on this page: http://www.phpbb.com/support/documents.php?mode=faq
Now, is it possible to use something else than server's time? Still looking for an answer... If anyone else has an idea... |
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Sat Jul 10, 2010 1:23 pm Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Otherwise you could go deeper and change the appropriate time functions so that it displays the server's time + the delay (13 minutes, for instance). I don't know if changing only one function would be enough or if phpBB2 uses several different ones.
But anyway you should contact the host to tell them to check their machine's time. Would be much easier and would fix it for everyone on the server. |
|
Back to top |
|
|
sbourdon Board Member
Joined: 26 Mar 2009
Posts: 8
|
Posted: Sat Jul 10, 2010 3:32 pm Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Salvatos wrote: | Otherwise you could go deeper and change the appropriate time functions so that it displays the server's time + the delay... |
Here's how to do this:
OPEN includes/functions.php and find the following line:
Code: | return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); |
Change it to:
Code: | return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + 180), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + 180); |
This will add 3 minutes (180 seconds) to your host's time. Change the value to whatever you want it to be! |
|
Back to top |
|
|
Sylver Cheetah 53 Board Member
Joined: 17 Dec 2008
Posts: 426 Location: Milky Way
|
Posted: Sat Jul 10, 2010 8:57 pm Post subject: Re: My forum is unsync (Wrong time...) |
|
|
Thank you!
I've only added 2 seconds. Two weeks ago there were 12 or 13 seconds, but now only 2 or 3. Strange how server's time varies.
I'm sure some of you may think I'm crazy thinkin' about 2 seconds, so let me tell you why I need this: I have a fifa championship with team management. When choosing teams (and other stuff), there is a certain day and hour. For example, today at 20:00 we give the start (not true, just an example). The registration topic is opened at 19:59, but who writes earlyer, the message is not considered. Why not open it at 20:00 then? Because I have to get a team for myself. If I loose time first for opening the thread and after that posting, I loose some precious seconds and probably all good teams are already gone. Also, some may say they try to post at 20:00:00 but the thread was still loked. So this gives people the chance to write in the very first second.
Is there any script wich can show me the server's time in real time? Because I have to post for testing it, but it takes about 2/3 seconds for my message to get posted, so I can;t be really sure. _________________ Image link
My Forum || My Blog
phpBB2 forever! |
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Sun Jul 11, 2010 11:49 am Post subject: Re: My forum is unsync (Wrong time...) |
|
|
I suppose you'd have to check if JavaScript has something like the time() function and build from there. |
|
Back to top |
|
|
Citrix Board Member
Joined: 19 Feb 2012
Posts: 42
|
Posted: Thu Feb 23, 2012 10:48 am Post subject: Re: My forum is unsync (Wrong time...) |
|
|
It's easy to change your time to whichever timezone you want from Cpanel. There is a "Change Server Time" link.
Click on it and select your timezone from the list.
done. |
|
Back to top |
|
|
|