View Full Version : Timezone problems
01-05-2008, 05:04 AM
PP1.6 gives me weird behaviour with timezone settings. My correct timezone is GMT+2 but if I use it PP locks the comment form: When a visitor writes a comment and sends it, my PP tells to wait because of spam flooding prevention. Then the comment just disappears. Very annoying.
I tried different settings a little bit. I found out that PP won't let me to go "backwards" with timezone setting without giving this problem. If I set it to GMT+3, I can't go back to GMT+2 - and currently I've set it to GMT+4 and now it's even impossible to go back to GMT+3 (or GMT+2, which would be the correct zone for me).
I tried to set it to GMT+2 and just wait a couple of hours, but the comment problem didn't disappear.
01-06-2008, 11:53 AM
jyrik, remember it is not your timezone but the timezone of the server running the software. So if you're in Europe and your server is in the USA you need to set the timezone based on the zone in the USA.
01-10-2008, 10:18 AM
Really? You mean the time zone setting in PP should be the same as the timezone the server is running? I thought the PP setting was there to make "post now"-functions and such to work as intended.
However server vs. pp timezone shouldn't be a factor in my case. I'm using a domestic server (in Finland, Europe), or at least that's what I'm told. My PP used to be on a server located in the USA, but I asked to be moved on a server in Finland. This was more than a year ago and I've updated PP to more recent versions after the move.
Btw, I feel stupid but I can't figure out exactly what time(zone) my server is currently using. Is there an easy way to find it out?
01-10-2008, 10:23 AM
Oh, and if everything else fails, is it somehow possible to disable the spam flood prevention entirely?
01-10-2008, 01:15 PM
Not all servers are set to the time zone where they are physically located. I worked for a company that had data centers throughout the United States and Europe, so every server we owned in any datacenter was set to GMT. It should be pretty easy to tell if this is the case for your server. Here are a few options.
If you have shell access to the server, login and run this command: date +%Z, that should tell you the system's time zone.
If you have a phpinfo file on your site, run it and look for the section called 'date', there should be a value in there called 'Default timezone' that tells you what timezone has been set.
Or you could create a file like this
echo date("H:i:s T");
Name it something like timezone.php and run it in a browser. It will display the web servers current time, plus the abbreviation for the time zone.
01-10-2008, 01:34 PM
Thanks. I created the timezone.php and it said "16:29:48 EET", which is the correct time for me at the moment.
I think the weirdest part is that PP has "allowed" me to use GMT+3, but once I tried GMT+4 it won't even let me go back to GMT+3 again.
01-10-2008, 02:46 PM
I'm trying to think this through, and I'm not sure what you mean when you say that PP won't allow you to change the timezone offset. Is it just that your comments don't work after you change the time zone? Or is there something preventing you from actually saving the timezone changes? Was this issue something a visitor reported to you or something you discovered through testing? If something you discovered while testing, what is the timestamp of the last comment made by you?
You can disable the spam flood protection, by setting the option in admin>options>spam control>prevent spam flood to 0 seconds.
01-10-2008, 03:14 PM
Yes, it's "only" about comments. I have not noticed any other problems caused by the timezone setting. I'm able to save the different settings. But if I set it to +4 and save it, and then try to go back closer to GMT the comments refuse to be saved. I'm only able to use the highest value I've tried without breaking the comment saving.
I discovered it myself through testing as I don't probably have a regular visitor who would be active enough to report it. :-/
I've tested it with 2-3 different computers (can't remember exactly).
Yeah, I thought that setting the spam preventon to zero seconds would disable it. But I was wrong, it only tells to wait 0 seconds and destroys the comment...
Btw thanks for your help so far. I wish I could solve this...
01-10-2008, 03:42 PM
Ok, so starting at GMT+3 you could save a comment. You changed to GMT+4 and saved a comment, then changed back to GMT+3 and get spam flood errors?
If I understand this correctly, then what's probably happening is that when you save a comment at GMT+4, it gets a time stamp that is one hour ahead. So say it's noon GMT. Set to GMT+3, the comment will have a time stamp of 3:00 pm. Set to GMT+4 the time stamp will be 4:00pm. If you save a comment at 4:00pm, then change back to GMT+3, when you try to save a comment, PP does a calculation based on the time of the last comment saved. It's probably subtracting the time stamp of the last comment from the new comments time stamp, and checking to see if this is greater than the flood interval. When the time zone changes the result is a negative number so it will continue to cause errors until enough time has passed that the time with the current time zone is later than the last comment.
You can check this in admin>comments and see if the time stamp is later than the server configured time.
01-11-2008, 04:26 PM
AFAIK the calculation is not based on the last comment saved but by a session which is created in the moment the comment form is called (<TOKEN>) and contains the actual time stamp.
Remove all sessions and cookies from your Photoblog's domain and try again!
austriaka is right. Do what she wrote.
01-14-2008, 03:04 PM
Okay, I managed to fix this just by setting the timezone from GMT+4 to GMT+2 and waiting for 2 hours (again). Funny, I thought I tried exactly the same thing before, but perhaps there was something that I didn't take into account.
I hope this thread will be useful to other users with similar problems.
edit: And thanks A TON to all of you helping me with this!
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.