Giter VIP home page Giter VIP logo

Comments (6)

GraylinKim avatar GraylinKim commented on July 29, 2024

I am assuming this replay was recorded on a Mac? I remember @issackelly having an issue with timestamps on Mac as well.

The code is that way for a reason, checkout the MLG WinterArena replay pack and see for yourself. If I recall my conversation with @issackelly we decided that it might be encoded differently on Mac vs PC. It seems like you've confirmed this suspicion. From a windows recording this seems to work fine.

            self.windows_timestamp = details.file_time-details.utc_adjustment
            self.unix_timestamp = utils.windows_to_unix(self.windows_timestamp)
            self.end_time = datetime.utcfromtimestamp(self.unix_timestamp)
            self.time_zone = details.utc_adjustment/(10**7*60*60)

The following seems to work on Mac replays (but not windows replays):

            self.windows_timestamp = details.utc_adjustment
            self.unix_timestamp = utils.windows_to_unix(self.windows_timestamp)
            self.end_time = datetime.utcfromtimestamp(self.unix_timestamp)
            self.time_zone = (details.utc_adjustment-details.file_time)/(10**7*60*60)

@dsjoerg, can you confirm this (on both platforms?).

I'd like to look for a flag indicating where it was recorded from but if I can't then we can always try one, check for a timestamp < 2010 and then try the other one.

from sc2reader.

dsjoerg avatar dsjoerg commented on July 29, 2024

Yes, it was recorded on a Mac. I won't be able to confirm anything until Tuesday or Wednesday, I'll check back in then.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

@dsjoerg, check out the commit above; I think it resolves this issue.

I'll leave it to you for confirmation and closing.

from sc2reader.

dsjoerg avatar dsjoerg commented on July 29, 2024

Graylin can I leave this to you? I am trying to focus on non-tech stuff that is harder to delegate, like getting the ggtracker bank account set up, get our first deal done and that kind of stuff. If you are confident that this is done you can close it.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

Yeah, I'll double check this and close it tonight.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

Alright, I can confirm that this works on the limited Mac files I have available. Perhaps this patch would interest @issackelly and he can re-open if he discovers otherwise.

from sc2reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.