phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

My forum is unsync (Wrong time...)


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: 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! icon_smile.gif
Back to top
sbourdon
Board Member



Joined: 26 Mar 2009

Posts: 8


flag
PostPosted: 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! icon_wink.gif
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: 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? icon_biggrin.gif

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
sbourdon
Board Member



Joined: 26 Mar 2009

Posts: 8


flag
PostPosted: 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... icon_confused.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: 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


flag
PostPosted: 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! icon_biggrin.gif
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: 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. icon_confused.gif

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. icon_smile.gif 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. icon_wink.gif

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! icon_smile.gif
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 449
Location: Québec


flag
PostPosted: 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



PostPosted: 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
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 4 Hours
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0465 seconds using 16 queries. (SQL 0.0084 Parse 0.0008 Other 0.0372)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo