Set register's time zone by default

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre

Set register's time zone by default

Postby dcaver » Thu Nov 27, 2008 4:35 pm

Is there a way that I can set the default time zone when someone tries to register on my forum?

In the Board Settings I have the system time zone set to CST (UTC-6) but when some tries to register the default is EST (UTC-5).


Thanks,
David
dcaver
Registered User
 
Posts: 15
Joined: Mon Nov 24, 2008 5:53 am

Re: Set register's time zone by default

Postby dellsystem » Thu Nov 27, 2008 4:40 pm

Setting the system timezone should work.

Could you fill out the Support Request Template please?
Former moderator and website team member | My MODs, and more (GitHub)
User avatar
dellsystem
Former Team Member
 
Posts: 3876
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy

Re: Set register's time zone by default

Postby dcaver » Thu Nov 27, 2008 4:57 pm

The following is the basic SRT
Your board's URL: http://forum.dallasdogndisc.com/forums
Version of phpBB3: 3.0.0
Was this a fresh install or a(n) update/upgrade/conversion (please be specific)? Fresh Install
If update, what package(s) did you use?
Did you use an automated wizard provided by your host to install phpBB? Yes
MODs you have installed: None
When the problem started: From the start
Your level of expertise (be honest): With phpBB - beginner

Additionally, you may wish to provide the following (where applicable)
Template(s) used: None
Language(s) used: Default
Version of PHP used: Don't know
Database and version used: Don't know
dcaver
Registered User
 
Posts: 15
Joined: Mon Nov 24, 2008 5:53 am

Re: Set register's time zone by default

Postby stevemaury » Thu Nov 27, 2008 5:18 pm

First, see this:

http://www.phpbb.com/kb/article/executi ... hpmyadmin/

Then try this query, changing the table prefix if yours is not phpbb_ :

Code: Select all
UPDATE phpbb_users SET `user_timezone` = '-6.00' WHERE `username` = Anonymous;


If that gives an error, try:

Code: Select all
UPDATE phpbb_users SET `user_timezone` = -6.00 WHERE `username` = Anonymous;
For REALLY good and VERY inexpensive hosting CLICK HERE

http://www.stevesstocks.com

All unsolicited PMs will be ignored.
User avatar
stevemaury
Support Team Member
Support Team Member
 
Posts: 44099
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve

Re: Set register's time zone by default

Postby dcaver » Fri Nov 28, 2008 5:30 am

There must be another setting that is driving that Timezone for user registration. I tweaked the query you sent and got it to update but it still showed a timezone of -5 when a user tried to register. I even ran a Select * for the Anonymous account and saw the timezone set to -6. I then tried to update the timezone to -7, verified it with a Select statement, then tried to register a new user. Still the timezone was -5 even when I had it set to -7.

Any ideas of another place that the timezone setting could be?


Thanks for the help.
dcaver
Registered User
 
Posts: 15
Joined: Mon Nov 24, 2008 5:53 am

Re: Set register's time zone by default

Postby RMcGirr83 » Fri Nov 28, 2008 2:45 pm

The board tries first to determine if the users time zone is the same as the servers

Code: Select all
      // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
      $timezone = date('Z') / 3600;
      $is_dst = date('I');

      if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
      {
         $timezone = ($is_dst) ? $timezone - 1 : $timezone;

         if (!isset($user->lang['tz_zones'][(string) $timezone]))
         {
            $timezone = $config['board_timezone'];
         }
      }
      else
      {
         $is_dst = $config['board_dst'];
         $timezone = $config['board_timezone'];
      }


..so I would guess it has something to do with that.
User avatar
RMcGirr83
Former Team Member
 
Posts: 16046
Joined: Wed Jun 22, 2005 4:33 pm
Location: Connecticut USA
Name: Rich McGirr


Return to 3.0.x Support Forum

Who is online

Users browsing this forum: andrewskg, BA172, Kevin Clark, Marshalrusty and 70 guests