Version: 1.00, by N!ck
Developer Last Online: Oct 2008
Version: 2.3.x
Rating:
Released: 03-28-2003
Last Update: Never
Installs: 10
No support by the author.
I have eliminated the only strange error I could find with this, so I am moving it to full releases.
What This Does
If your users pay as little attention to their options as mine do, this might be just what you need. It uses a JavaScript to detect when a user has their timezone setting set different than their computer's clock. If the computer time does not match, the user is given a JavaScript prompt on your main page asking whether he/she would like to adjust their timezone setting. If they select yes, a new window will pop up, make the change, and close. EXCEPTION: This will yield very unsatisfactory results for users in strange timezones whose offsets are not whole numbers (i.e. Newfoundland is GMT-3.5). I haven't figured out how to do this yet, but I will update this hack if I do figure it out. You may want to just remove those options from your registration/profile options.
Scroll down for screenshots.
Let me know how it works out, and, as always, click INSTALL if you use it, please!
for example, Sydney:
DST ended on Sunday, March 30, 2003, at 3:00:00 AM local daylight time
DST starts on Sunday, October 26, 2003, at 2:00:00 AM local standard time
Instead of adding the code to your global.php (and save yourself a PHP file edit and headaches when you upgrade), you can add this to the bottom of your phpinclude template:
PHP Code:
if ($dotimezonecheck AND ($bbuserinfo[usergroupid] == 2 OR $bbuserinfo[usergroupid] == 5 OR $bbuserinfo[usergroupid] == 6 OR $bbuserinfo[usergroupid] == 7)) {
$nowhours=vbdate("H",time());
eval("\$timezonecheck = \"".gettemplate('hi_timezone')."\";");
}
I changed the code a bit to make it so that only registered members and staff will get the popup to update the timezone. Members awaiting email registration, banned members etc. will not get it. I didn't want members still waiting email registration to get the timezone update, as they are not meant to be able to access their user CP as such.
If your server time is 10:01 but your computer time is 9:59 (ie. a difference of 2 minutes) the timezone hack thinks that you are off by 1 hour, and will activate, and move your time back by 1 hour by mistake. You then have to manually change the timezone back. This only happens when the small difference goes from 1 hour to the next.
Okay, I've had to remove this. It added an extra query each time a member visits forumhome to check the timezone, and it really didn't work when there was a few minutes difference, and the time changes over the hour. Maybe make it so that any minutes with 50-59 or 01-09 were excluded, so that the 10 minutes before or after the hour change, the timezone won't be checked, for computers which are just off by a few minutes.