Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Forum time offset (for servers with time that is a few minutes off etc.) Details »»
Forum time offset (for servers with time that is a few minutes off etc.)
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-07-2004 Last Update: Never Installs: 17
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
babyv0x, hanhdn

Comments
  #2  
Old 02-08-2004, 07:43 PM
MGM MGM is offline
 
Join Date: Jan 2003
Location: Michigan
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice! mine is 23 minutes off

[high]* MGM clicks Install
[/high]

MGM out
Reply With Quote
  #3  
Old 02-09-2004, 12:39 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 02-09-2004, 02:00 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will come in handy.

buro9 - the host might not want to change the time, or simply, not have the time.
Reply With Quote
  #5  
Old 02-09-2004, 03:58 PM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Simple, but works!
Reply With Quote
  #6  
Old 02-09-2004, 06:36 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 02-19-2004, 08:58 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gary W
It works, it's simple, so what's the problem?
There is none.!

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.
Reply With Quote
  #8  
Old 02-19-2004, 10:00 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-19-2004, 11:13 AM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 02-19-2004, 12:08 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04731 seconds
  • Memory Usage 2,309KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete