vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Forum time offset (for servers with time that is a few minutes off etc.) (https://vborg.vbsupport.ru/showthread.php?t=61321)

Gary King 02-07-2004 10:00 PM

Forum time offset (for servers with time that is a few minutes off etc.)
 
I created this for myself, but I figured others might benefit from this as well :)

What this hack does, is makes the forum time the 'right' time by offset-ting the time a few minutes ahead or a few minutes behind than the original server time. For instance, my server is about 6 minutes behind, so I would use 360 to define the number of seconds of offset.

All you have to do, is open up includes/init.php and find:
PHP Code:

define('TIMENOW'time()); 

Replace with
PHP Code:

define('TIMENOW'time() + 360); 

and change 360 to the number of seconds you want to be faster on the forums, or change the + to - to slow down the time on the forums :)

MGM 02-08-2004 07:43 PM

very nice! mine is 23 minutes off ;)

[high]* MGM clicks Install
[/high]

MGM out

buro9 02-09-2004 12:39 PM

Quote:

Originally Posted by MetalGearMaster
very nice! mine is 23 minutes off ;)

[high]* MetalGearMaster clicks Install
[/high]

MGM out

Can you not get your hosts to correct this?

I'm with ventures online, and every VPS account I've had has been out... I just ask them to create a cron to run weekly and update the time against an Internet time server... and they've always done it straight away.

Afterall... the time on the system is part of their remit and not yours.

Not trying to diss the hack... may be very useful for some... but if the root cause is with your host... then get them to fix it. Can't help but think that if their servers are out, they'll continue to slip further out and you'll have to change your hack value all the time.

FleaBag 02-09-2004 02:00 PM

This will come in handy.

buro9 - the host might not want to change the time, or simply, not have the time.

gmarik 02-09-2004 03:58 PM

Simple, but works!

Gary King 02-09-2004 06:36 PM

Quote:

Originally Posted by FleaBag
This will come in handy.

buro9 - the host might not want to change the time, or simply, not have the time.

Yeah that's what happens sometimes. For instance, you can't say that all hosts have good support etc. but some people still go with them because of reasonable prices, etc. I sometimes do that even when I don't need too much support, like on the server that I use this hack on :)

It works, it's simple, so what's the problem? ;)

Oblivion Knight 02-19-2004 08:58 AM

Quote:

Originally Posted by Gary W
It works, it's simple, so what's the problem? ;)

There is none.! :D

Also, some of us don't want to bother the server admin too often.. Especially for such small things as changing the time by a few minutes. This mod does the job perfectly.

Boofo 02-19-2004 10:00 AM

Quote:

Originally Posted by Gary W
Yeah that's what happens sometimes. For instance, you can't say that all hosts have good support etc. but some people still go with them because of reasonable prices, etc. I sometimes do that even when I don't need too much support, like on the server that I use this hack on :)

It works, it's simple, so what's the problem? ;)

The problem is that if your server is off of the time now, it is going to continually be off time and you will always end up having to readjust the hack to keep the server on time. If your host is too busy to set the server time, then they aren't much of a host and not worth paying for.

Gary King 02-19-2004 11:13 AM

Quote:

Originally Posted by Boofo
The problem is that if your server is off of the time now, it is going to continually be off time and you will always end up having to readjust the hack to keep the server on time. If your host is too busy to set the server time, then they aren't much of a host and not worth paying for.

You don't have to re-adjust the time if the clock is going to the same speed as the actual world clock, but just off a few minutes; doesn't mean it is going at a different speed from the real world clock.

For instance my in case, the host just set the time wrong; but then just one installation of this hack and I don't have to worry about it ever again :)

Anyways why does it matter about this I don't know why I'm even explaining this hack this much ;) If you don't want to install it, no one is forcing you to :)

Andreas 02-19-2004 12:08 PM

What about creating a vB-Cronjob that compares local time to a time server and stores the adjust-value in the settings-table?
This way you would not have to adjust the value manually - no PC clock never-ever goes 100% correct.

Anyway, this is a hosts issue and it should be their responsibility to keep the time correct, as this is a vital server function.


All times are GMT. The time now is 08:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05418 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete