GithubHelp home page GithubHelp logo

Comments (8)

thejosejorge avatar thejosejorge commented on May 29, 2024

Hi @seanob86,

Thanks for reporting this.
Unfortunately I am not able to reproduce, I am getting the correct time and date on my widget:

Can you add the following on row 201 (immediately after we get the matchDetails) and share the log information? It seems the time and date information is not being properly retrieved.
201 console.log(matchDetails.content.matchFacts.infoBox["Match Date"])

In the end it should look like:
200 const matchDetails = await getData(matchDetailsUrl, matchDetailsOffline);
201 console.log(matchDetails.content.matchFacts.infoBox["Match Date"])

Thanks,
Jose

from futcal-for-scriptable.

seanob86 avatar seanob86 commented on May 29, 2024

Monday, April 12 2021, 5:00 a.m.
Saturday, April 17 2021, 6:00 a.m.

I also copied the script off GitHub and without making any changes I still get the issue.

from futcal-for-scriptable.

thejosejorge avatar thejosejorge commented on May 29, 2024

Hi @seanob86,

Thanks for the quick feedback!
So that's the problem, for some reason the string format in the API changed and it's causing the date/time to break since "a.m."/"p.m." is not an expected format. I am not seeing this new format (and therefore not reproducing the issue) probably because we are in different time zones. (I assume you are not in the UK since the time for the next Man United match is 6am)

I can make a change to fix this but in order to understand the best way to do it can you please also add the following to the script (immediately after what we previously added) and share the log information?
console.log(match.status.startDateStr)
console.log(match.status.startTimeStr)

Thanks,
Jose

from futcal-for-scriptable.

seanob86 avatar seanob86 commented on May 29, 2024

Friday, April 16 2021, 5:00 a.m.
Fri, 16 Apr
undefined
Monday, April 19 2021, 1:00 a.m.
Mon, 19 Apr
01:00

it’s actually 1AM for my local time zone. It was 6AM for the default settings when I recopied the script off GitHub. My time zone setting

timeZone: "Australia/Melbourne",

from futcal-for-scriptable.

thejosejorge avatar thejosejorge commented on May 29, 2024

Can you please try again with the latest version?

Apparently FotMob is changing their API structure / data so the widget needs to be adapted to these changes.

from futcal-for-scriptable.

seanob86 avatar seanob86 commented on May 29, 2024

Thank you! It's now working with latest version 👍

from futcal-for-scriptable.

thejosejorge avatar thejosejorge commented on May 29, 2024

Closed.

from futcal-for-scriptable.

seanob86 avatar seanob86 commented on May 29, 2024

Hey @thejosejorge its me again.
just noticed I’m having issues again with time as NaN:NaN for next match.

I copied the code again and running the code as is works. But as soon as I change team to manutd and Timezone to “Australia/Melbourne” the issue can be seen.

9ABC1249-8BDF-4087-81D7-926395F9D79E

from futcal-for-scriptable.

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.