Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2005, 02:37 AM
DocBenny DocBenny is offline
 
Join Date: Oct 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to go around the server to display correct time on forum

My horrible host is not helping, or is not admitting that there is a problem. But the server time apparently is totally screwed. Even the minutes are wrong, and no matter how much I play with the GMT settings, it's all messy.

The guys at vbulletin.com told me that there might be a hack code to go around this problem, so that my forum doesn't read the time directly from the server. And told me that someone here can perhaps help me.

I would tremendeously appreciate any help about this. It's been a month with this problem and I'm going nuts. Please help.

If someone can help, bear in mind that I'm pretty new to this, and my expertise does not lie in computers.
Reply With Quote
  #2  
Old 11-11-2005, 06:01 AM
DocBenny DocBenny is offline
 
Join Date: Oct 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone just tell me if such a code exists or can be done, at least?

Let me know if I've posted this in the wrong forum. Sorry.
Reply With Quote
  #3  
Old 11-11-2005, 10:15 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know of any hack that could help you with this. The only thing i can think of, is to edit the following code in your ./includes/init.php, and adjust the time. But not sure if that would be enough to change everywhere.
PHP Code:
// start the page generation timer
$pagestarttime microtime();
define('TIMESTART'microtime());

// set the current unix timestamp
define('TIMENOW'time()); 
By best advice would be to change hosts.
Reply With Quote
  #4  
Old 11-11-2005, 12:29 PM
phonexpo phonexpo is offline
 
Join Date: Sep 2005
Location: Dublin
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DocBenny
My horrible host is not helping, or is not admitting that there is a problem. But the server time apparently is totally screwed. Even the minutes are wrong, and no matter how much I play with the GMT settings, it's all messy.

The guys at vbulletin.com told me that there might be a hack code to go around this problem, so that my forum doesn't read the time directly from the server. And told me that someone here can perhaps help me.

I would tremendeously appreciate any help about this. It's been a month with this problem and I'm going nuts. Please help.

If someone can help, bear in mind that I'm pretty new to this, and my expertise does not lie in computers.
I'm having the same problem mate, I'm moving hosts the weekend. I'd take MarcoH64 advice and move. Who are your hosts anyway?
Reply With Quote
  #5  
Old 11-11-2005, 08:48 PM
DocBenny DocBenny is offline
 
Join Date: Oct 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx for the helpt, I'll try modifying that and see what happens.

I would change my host in a second, but I have paid for the whole year(can't get a refund), and just for that I don't want to move yet.

I trusted my co-admin and got a host from abroad, an eastern euro country, although the servers are located in Chicago. But man, am I sorry. Totally unprofessional.

Quote:
Originally Posted by MarcoH64
I don't know of any hack that could help you with this. The only thing i can think of, is to edit the following code in your ./includes/init.php, and adjust the time. But not sure if that would be enough to change everywhere.
PHP Code:
// start the page generation timer
$pagestarttime microtime();
define('TIMESTART'microtime());

// set the current unix timestamp
define('TIMENOW'time()); 
By best advice would be to change hosts.
Where would I adjust the time in that code. I found the code, but it appears just as you typed it, would I enter some numerical values anywhere?

Sorry, I am not knowledgable about this.
Reply With Quote
  #6  
Old 11-12-2005, 05:07 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something like (i used plus in the following example, but it could also be minus):
PHP Code:
define('TIMESTART'microtime() + 9999); 

// set the current unix timestamp 
define('TIMENOW'time() + 99); 
99 = seconds
9999 = milliseconds
Reply With Quote
  #7  
Old 11-17-2005, 03:39 AM
DocBenny DocBenny is offline
 
Join Date: Oct 2005
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much. So far it seems to be working fine with the adjustments that you gave me.

I hope it stays that way.

Thanks again
Reply With Quote
  #8  
Old 03-16-2008, 12:22 AM
Piccante Piccante is offline
 
Join Date: May 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Marco. That fix has sorted out my time discrepancy too.
Reply With Quote
  #9  
Old 04-15-2008, 10:42 PM
steven s's Avatar
steven s steven s is offline
 
Join Date: Aug 2004
Location: Greenville, SC
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was looking for something like this too.
It would be cool if a script logged into an official time website and made the adjustments on a regular basis.
Reply With Quote
  #10  
Old 04-15-2008, 11:38 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 1996 328ti View Post
I was looking for something like this too.
It would be cool if a script logged into an official time website and made the adjustments on a regular basis.
You can set up a cron job on your server to do this.

Command: /etc/webmin/time/sync.pl
Set the time for once a day (or whatever)
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 08:17 PM.


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.04165 seconds
  • Memory Usage 2,254KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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