vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to go around the server to display correct time on forum (https://vborg.vbsupport.ru/showthread.php?t=100515)

DocBenny 11-10-2005 02:37 AM

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. :)

DocBenny 11-11-2005 06:01 AM

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.

Marco van Herwaarden 11-11-2005 10:15 AM

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.

phonexpo 11-11-2005 12:29 PM

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?

DocBenny 11-11-2005 08:48 PM

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.

Marco van Herwaarden 11-12-2005 05:07 AM

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

DocBenny 11-17-2005 03:39 AM

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

Piccante 03-16-2008 12:22 AM

Thanks Marco. That fix has sorted out my time discrepancy too.

steven s 04-15-2008 10:42 PM

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.

Lynne 04-15-2008 11:38 PM

Quote:

Originally Posted by 1996 328ti (Post 1491632)
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)

steven s 04-16-2008 12:08 AM

Quote:

Originally Posted by Lynne (Post 1491671)
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)

I don't control the server.
I was hoping someone had a script that would look at the server time and adjust vB accordingly.

Marco van Herwaarden 04-16-2008 09:41 AM

Ask the server admin to setup NTP (Network Time Protocol)

steven s 04-16-2008 10:02 AM

Thanks.
I'll forward that to my host.
Joey, are you listening? :)


All times are GMT. The time now is 05:41 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.01290 seconds
  • Memory Usage 1,749KB
  • 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete