This issue has to do with your timezone. The further you are from UTC time, the more likely you will see this issue. I have been somewhat aware that there was an issue with the date/times but I haven’t investigated it until now. Thank you. ??
Fortunately, I already have a fix ready for my next release. However, I’m planning to make my release once the Spanish translation of my plugin is ready, which may still be awhile.
If you don’t want to wait, here’s how to fix the issue yourself:
- Got to Plugins > Editor.
- Select Challonge from the dropdown and click Select.
- Click challonge/class-challonge-plugin.php from the right side.
- Find line 247:
. date_i18n( get_option( 'date_format' ), strtotime( $tourny->{'created-at'} ) ) . ' | '
- Change line 247 to this:
. date_i18n( get_option( 'date_format' ), strtotime( substr( $tourny->{ 'created-at' }, 0, -6 ) . '+00:00' ) ) . ' | '
- Do the exact same thing to line 272.
- Click Update File to save your changes.
- Click challonge/class-challonge-shortcode.php.
- Find line 299:
strtotime( $tourny->{ 'created-at' } )
- Change line 299 to this:
strtotime( substr( $tourny->{ 'created-at' }, 0, -6 ) . '+00:00' )
- Click Update File to save your changes.
That’s it! You should now see the correct date.
Once again, thank you for the feedback! ??