Author Topic: StatsGenie: Incorrect time when importing tournament  (Read 147 times)

kungfauxn00b

  • Newbie
  • *
  • Posts: 2
    • View Profile
StatsGenie: Incorrect time when importing tournament
« on: December 11, 2022, 05:36:17 PM »
Hey, I know this is a SG problem but I posted on their forum a few weeks ago and got nothing back. I've emailed them and tried contacting via FB but nothing. Last thing to try is on here to see if anyone else had/has the same issue?

Here's my post: http://pokerbb.statsgenie.com/viewtopic.php?f=23&t=2117

In summary, uploading a tournament via the API integration or manually via the file export, the time in SG is +5hrs. The workaround I'm using is to export the data to file, amend the times in the XML to -5hrs then upload manually. Altough it works, it's not ideal and not the expected behaviour.

Everything in my profile in SG is set to UK and I can't see a time zone setting.

Anyone any ideas?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6100
    • View Profile
Re: StatsGenie: Incorrect time when importing tournament
« Reply #1 on: December 21, 2022, 06:39:51 PM »
Hey!  Sorry to leave you hanging for so long on this topic.  I actually started a response a couple of times, and then abandoned it and looked a little more into the issue, and then left town for a few days.  When I returned I dug in a little more and found an email thread between me and Martin of StatsGenie regarding this very issue from 2020.  And unfortunately I forgot about it and it didn't get fixed with 3.7 or subsequent versions.

The main issue here is actually on the TD side, and it's that I didn't code the export to put times in UTC format.  That means there's no indication on those times of your time zone, and so StatsGenie has to do its very best to figure it out.  When you export to an XML file and then upload that file via the StatsGenie website, your web browser session has a time zone, and therefore they have a decent chance at figuring out your time zone and acting accordingly.  When you upload your tournament directly from the TD, that session doesn't exist and StatsGenie has to figure it out another way.  I would guess they store your time zone in your account in some way and can simply assume anything you import would be in your local time.  I know they applied a hack of some sort to make this work, because the user who initiated the investigation into this issue was seeing his times off by a single hour and the hack fixed it.  Yours are off by a lot more and honestly I don't know what's going on there.

The best fix for this is for me to update the StatsGenie export from the TD to specify times in UTC, which is what I have done for the next release.  Interestingly, without this change tournaments I import into StatsGenie actually have my correct time zone, and tournaments I import with UTC times are an hour off.  I think I'm probably working around their hack, so instead of the hack fixing bad times I'm giving it good times and the hack makes the times bad.

In the meantime to import your tournaments with correct times you'll probably have to keep adjusting the times.  But an easier way than manually editing the XML export file is to use the "Time Shift" feature found on the Players tab.  This will allow you to adjust every time in the tournament (start, end, buy-ins, rebuys, add-ons, bust-outs, etc).  You can then export the tournament to StatsGenie, followed by simply adjusting the times back using the same Time Shift feature.

I've got an email out to Martin to coordinate with him on the best way to fix it.  Hopefully it will be an easy change.

Also, I see you noted that they didn't respond to your post on the StatsGenie forums but it looks like Martin did follow-up on that post sometime later.  I recommend you connect with him to see what the best solution for you in the meantime is (if it's not what I suggested above).