Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2001, 04:13 PM
JimF JimF is offline
 
Join Date: Dec 2001
Location: NJ
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many people have been complaining about the fact that unregistered users see all times on the board in GMT, despite what is set in the Control Panel. In order for timezoneoffset to work, the user has to have a timezone offset specified in their profile. I wanted to fix this on my board, and thought I'd share what I did.

In sessions.php, all you have to do is modify the timezone offset for guests. On line 285, find where it says:

PHP Code:
$bbuserinfo['timezoneoffset']=0
and change that to whatever you'd like the default time to be. For example, I have:

PHP Code:
$bbuserinfo['timezoneoffset']=-5
The only thing that this doesn't do is change the part of the board that says "All times are GMT..." - but at least where it says "Time Now:" will be correct, and not 5 hours ahead of 99.99% of my visitors.

Just thought I'd share .

-jim
Reply With Quote
  #2  
Old 02-25-2001, 04:18 PM
Guest
 
Posts: n/a
Default

timezones are a pain - i have alot of US, European and Australia based members and the timezone offset causes problems cause i like to set it as default Brisbane, Australian time - and of course to make this even more difficult, Brisbane /Queensland is the only state in Australia which abolished daylight savings
Reply With Quote
  #3  
Old 10-06-2002, 06:17 PM
telc's Avatar
telc telc is offline
 
Join Date: Dec 2001
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks alot!
Reply With Quote
  #4  
Old 12-03-2002, 04:30 AM
fello9 fello9 is offline
 
Join Date: Jul 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, I just used it.
Reply With Quote
  #5  
Old 12-03-2002, 06:58 AM
snoopy2 snoopy2 is offline
 
Join Date: Aug 2002
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx!
Reply With Quote
  #6  
Old 12-13-2002, 03:19 AM
basurf basurf is offline
 
Join Date: Dec 2002
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That code edit didn't seem to work for me. Front page still shows the time in GMT.

sessions.php

$bbuserinfo['timezoneoffset']=-6;
Reply With Quote
  #7  
Old 03-03-2003, 04:21 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wondeeful.

a small tip for those who are in GMT +x time

use " +x" , so your board will say
All times are GMT +x hours
instead of
All times are GMT x hours

PHP Code:
$bbuserinfo['timezoneoffset']="+1"
Reply With Quote
  #8  
Old 07-08-2009, 06:11 AM
Gamelobby's Avatar
Gamelobby Gamelobby is offline
 
Join Date: Jul 2007
Location: Long Beach, CA
Posts: 997
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this is old, but i am having a similar problem.. And i cant find sessions.php

Mine is not just for guests.. but everyone, no matter what i set in the ACP or what people set in their profile it still says GMT.?
Reply With Quote
  #9  
Old 07-20-2009, 05:16 AM
massi64 massi64 is offline
 
Join Date: Jun 2009
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have vbulletin 3.8.3 and i cant find sessions.php , can you guys tell me where is it ?
anybody ?

thanks
Reply With Quote
  #10  
Old 07-20-2009, 06:53 AM
mme42 mme42 is offline
 
Join Date: Feb 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Keep in mind that this thread was started in 2001. I have no idea how vBulletin handled the time then, but I definitely wouldn't be surprised if it's different. In recent versions you can set the default time zone offset in the admincp.

ACP > vBulletin Options > Date and Time Options > Default Time Zone Offset

Then for wording (The time is now....) that's a phrase which can be edited:

[all_times_are_gmt_x_time_now_is_y]

Personally, I'd stick with GMT for the wording if you have users from different countries as it's the most universally known zone. Then, for your default offset, select the time zone where most of your users are from.

If you wanted to edit the wording you could use something like "All times are EST, time now is(2)" In other words, you'd replace "GMT" with the desired zone and remove the "(1)" which inserts the offset amount from GMT. But, I'd stick with GMT myself.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:51 PM.


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.07379 seconds
  • Memory Usage 2,248KB
  • Queries Executed 13 (?)
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
  • (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
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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