vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Profile Enhancements - vB3.5 Local time and date in post and profile (https://vborg.vbsupport.ru/showthread.php?t=94869)

mcyates 08-26-2005 01:43 PM

it just seems to be showing the server time which is -4 GMT I have set this on the settings, and in my options i have put GMT with day light savings active. It doesn't work.

Xplorer4x4 08-28-2005 06:20 AM

Nope Boofo, it is not working. I set the default time to eastern time seeing as my servers are located in New York. I checked with one of my mbers and his time is listed as 9:18PM when it is 3:18 there. As I said before I only installed this in my meber info tepmplate.

Boofo 08-28-2005 06:33 AM

Quote:

Originally Posted by mcyates
it just seems to be showing the server time which is -4 GMT I have set this on the settings, and in my options i have put GMT with day light savings active. It doesn't work.

You lost me. You have GMT set as your time in the User CP?

mcyates 08-28-2005 06:38 PM

Quote:

Originally Posted by Boofo
You lost me. You have GMT set as your time in the User CP?

sorry that was very confusing. In admin cp the Default Time Zone Offset is on GMT. But the server is 4 hours behind. So if my time was 12:00 then it would be showing 08:00 on the local time. So its always 4 hours behind, Unless you change your setting to GMT +4 then the time will be correct.

For example its 18:00 and my setting is on GMT, my local time is showing 14:00. I then go into usercp and change my setting from GMT to GMT+4 my time now shows 18:00 which is the correct time BUT my settings are not correct, they are set to GMT+4 when i live in UK which is GMT.

Doe this help?

mcyates 08-28-2005 06:40 PM

So basically to get the time to show correctly I have to put my settings 4 hours ahead of what they actually are as my server is 4 hours behind. But now the time at the bottom of the vbuklletin pages are 4 hours ahead. lol!!

Boofo 08-28-2005 07:27 PM

The setting in my vBulletin Options are what the server time is at. My server is set at GMT, although I am in CST (USA). So I set my vBulletion Options time at GMT, which is the actual server time. Try setting the vB options setting to your actual sever time and see if that makes it right then.

Paul M 08-28-2005 07:32 PM

The time is probably 4 hours out because the code does not take into account the local servers timezone. It needs to be extracted using date('Z', TIMENOW) and applied as a correction.

I would also consider removing this from the code ;

Code:

  if (substr($userinfo['tzoffset'], 0, 1) != '-')
  {
  // recorrect so that it has + sign, if necessary
  $userinfo['tzoffset'] = '+' . $userinfo['tzoffset'];
  }

It's purely for display purposes and not really required for the calculations in this hack. :)

Boofo 08-28-2005 07:34 PM

Quote:

Originally Posted by Paul M
The time is probably 4 hours out because the code does not take into account the local servers timezone. It needs to be extracted using date('Z', TIMENOW) and applied as a correction.

I would also consider removing this from the code ;

Code:

if (substr($userinfo['tzoffset'], 0, 1) != '-')
{
// recorrect so that it has + sign, if necessary
$userinfo['tzoffset'] = '+' . $userinfo['tzoffset'];
}

It's purely for display purposes and not really required for the calculations in this hack. :)

I'm not sure I understand what you are getting at. Please PM me with the details if you would, sir. ;)

Paul M 08-28-2005 08:10 PM

Quote:

Originally Posted by Boofo
I'm not sure I understand what you are getting at. Please PM me with the details if you would, sir. ;)

PM ? Okay :)

mcyates 08-29-2005 05:48 AM

Quote:

Originally Posted by Boofo
The setting in my vBulletin Options are what the server time is at. My server is set at GMT, although I am in CST (USA). So I set my vBulletion Options time at GMT, which is the actual server time. Try setting the vB options setting to your actual sever time and see if that makes it right then.

No it still makes no change, the times are still 4 hour s behind.


All times are GMT. The time now is 06:35 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.01501 seconds
  • Memory Usage 1,740KB
  • 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_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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