Support » Plugin: Football Pool » [Plugin: Football Pool] First game has started and still can change result

Viewing 12 replies - 1 through 12 (of 12 total)
  • same here…… and now we are looking like idiots in front of the users…. I have over 2.6k of them…..

    I have found out that changing the time to two hours earlier will lock the score.
    It seems that it has a two hours difference from what it should be.

    I still can change it…..

    Try to subtract one hour at a time and see if the game is locked. Then you will make sure the time difference.

    the games time? or the system time?

    I changed the first game time, one hour at a time. After confirming the time difference, I changed all games time.

    still didn’t work for me so I changed the game time to 12:00

    Plugin Author AntoineH

    (@antoineh)

    This may be a timezone problem. There are different settings on the server that may conflict each other.

    The times of the matches are entered in CET. The code that decides if a game is editable takes the match time and transforms it to a timestamp (taking MySQL’s setting). This timestamp is compared to the time() function in PHP (PHP’s timezone setting) and the “Prediction stop (in seconds)” setting in the plugin’s settings

    The easiest solution for this is to change the “Prediction stop” in the plugin configuration. That way you can leave the match times the same and just change one setting.
    The difficult solution is to try to figure out what settings MySQL and PHP use.

    found in de code of the plugin it is using the time function, this should give back the time in seconds, since 1970(unix epoc) but it doesn’t. the difference is much bigger.

    the time zone is not considered by the time zone of the server.
    for central european time at 7200( 2 hours) and the add the minutes.

    so for 15 minutes before a match 7200+15*60 = 7500

    Maybe the developer can help some more to calculate with the time zone. but this will fix it if you are in central europe.

    7200+15*60 = 8100 ofcourse

    Plugin Author AntoineH

    (@antoineh)

    I have it on my wishlist to make all dates UTC and use the WordPress setting for timezone. My guess is that it will be more clear for admins in different timezones and different server settings how to adjust the times to make it fit.

    But this has a large impact on the code and existing installs. And I don’t want to ruin it for all users that don’t have this problem.

    So for now, I think the “Prediction stop” setting is the quickest and safest way to fix it.

    Plugin Author AntoineH

    (@antoineh)

    I implemented the UTC dates for matches in version 2 of the plugin. This should cover the Timezone differences and make it more clear for Admins on how to set the dates so the are displayed correct on the front-end and calculated correct for the prediction logic.

    The updated Help page in the WP admin has details about the times of matches and bonus questions.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Football Pool] First game has started and still can change result’ is closed to new replies.