WordPress.org

Ready to get started?Download WordPress

Forums

Football Pool
[resolved] First game has started and still can change result (13 posts)

  1. sjonas
    Member
    Posted 2 years ago #

    I have not changed the date and time of the match, and the server is hosted in same time zone as the ones setup at the admin.
    So, the first game has started for half an hour already, and it is still possible to change the result.
    I have a big pool running and this will be the end..

    http://wordpress.org/extend/plugins/football-pool/

  2. miniu81
    Member
    Posted 2 years ago #

    same here...... and now we are looking like idiots in front of the users.... I have over 2.6k of them.....

  3. sjonas
    Member
    Posted 2 years ago #

    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.

  4. miniu81
    Member
    Posted 2 years ago #

    I still can change it.....

  5. sjonas
    Member
    Posted 2 years ago #

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

  6. miniu81
    Member
    Posted 2 years ago #

    the games time? or the system time?

  7. sjonas
    Member
    Posted 2 years ago #

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

  8. miniu81
    Member
    Posted 2 years ago #

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

  9. AntoineH
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  10. vanbeek
    Member
    Posted 2 years ago #

    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.

  11. vanbeek
    Member
    Posted 2 years ago #

    7200+15*60 = 8100 ofcourse

  12. AntoineH
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  13. AntoineH
    Member
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic