Version: 1.00, by N!ck
Developer Last Online: Oct 2008
Version: 2.3.x
Rating:
Released: 03-23-2003
Last Update: Never
Installs: 2
Is in Beta Stage
No support by the author.
This is kinda hard to explain, but this hack basically detects when a user doesn't have their timezone set correctly (when their set time doesn't match their computer time). It gives the user a JavaScript prompt asking whether they would like to update their timezone. If they click "OK", it pops open a small window for a couple of seconds, updates the user's timezone offset accordingly in the database, and closes the window.
This is a beta!! I've played with it a little, and it appears to work *most of the time*. I'm releasing it in the hopes that someone can help me fix any errors that come up. (I expect errors to come up.)
It is important to note that the idea was inspired by FireFly's HiveMail, but the JavaScript is written completely by me. I previously asked about it (underestimating my own abilities, I guess) and was told that I had to get permission from Chen. I emailed him but haven't received a response, so I went ahead and wrote this. If any mods have a problem with this, just delete the thread and the hack.
This hack does not work for users in Newfoundland, since their offset is -3:30.
IF YOU DOWNLOADED THIS BEFORE 5:45 PM PDT ON 03/24/03, change all instances of "hi_timezoneoffset" to "hi_timezone" (disregard the quotes in both cases). Then, re-apply step 1.
IF YOU DOWNLOADED BEFORE 6:10 PM PDT ON 03/24/03, remove from your hi_timezone template the following:
Code:
} else if (difference<0) {
sdifference="-"+difference;
IF YOU DOWNLOADED BEFORE 7:35 PM PDT ON 3/28/03,
open global.php and replace:
Yesterday at 10:45 PM Smoothie said this in Post #20 Woa, calm down there. Your desription of the hack;It does nothing. I'm assuming you mean if your time zone in your user cp is set wrong, this script will detect the incorrect time, and a js will prompt asking if you would like to update to the correct time zone. I use hivemail, I know how it is suppose to work.
You still aren't giving details. View the source, and let me know whether the JS appears.
I do have THIS javascript, but not the checktime() thing.
Code:
<script language="JavaScript">
<!--
var curDate = new Date();
var shours = curDate.getHours();
if (shours!=) {
var difference = shours-;
if (difference>0) {
sdifference="+"+difference;
} else {
sdifference=difference;
}
if (confirm("We have detected that your timezone is not set correctly. Would you like to correct it now?")) open("updatezone.php?offset="+sdifference, "", "width=10,height=10");
}
//-->
</script>
I get the "We have detected that your timezone is not set correctly. Would you like to correct it now?" javascript prompt now. I click on it and it takes me to the index page and the time is not changed.
Ok, got it working, I see where part of the problem is. Your instructions aren't updated.
Anyway, I set my time in my User CP to a different time zone. When I reload the index page, I get the JS prompt; "we have detected that your timezone is not set correctly. Would you like to correct it now?" click yes, but it sets it 19 hours ahead, it should GMT -5 hours. I'm EST.
The time is correct but....
All times are GMT +19 hours. The time now is 11:50 PM.