Code Monkey home page Code Monkey logo

Comments (4)

mrihtar avatar mrihtar commented on June 16, 2024

I think Sigma Data Center handles/stores (some?) dates in a local format and your locale is different than the one used in fit2slf (which generates format for the default locale "C"). That's why the error "could not convert string value to date" occurs. I could generalize the date formatting (in routine PrintSlfHeader, call to POSIX::strftime), but there is a problem with UTC offset, which is not added to the normal "%c" locale representation.

Could you please generate one log file from your Sigma Data Center to see what your format of date is?

You can also check if your converted log file imports successfully after you manually modify the date to your local format. Search for "fileDate", "dateCode" and "startDate" and fix the date format.

from garmin-fit.

Ottomo1975 avatar Ottomo1975 commented on June 16, 2024

Hi,

thanks for your very quick response. Really appriciate that.

I modified the input.slf I´ve generated with the date format that I see when I create an .slf export from the Sigma Data Center.
But still get the same error.

I´ve attached mail a zip file containing an export from the Sigma Data Center and the generated input.slf.

Thanks again for your work and I would love to donate you some money If we could get this working.

Cheers

from garmin-fit.

mrihtar avatar mrihtar commented on June 16, 2024

I've checked your input.slf and the problem is in "startDate" only. Are you sure "Sa Okt ..." is the right format? Shouldn't it be "Sam Okt ..." (a three letter day abbreviation)? If I use "Sat Oct" (as I am using default US locale), I can successfully import your file. The other file has default "C" format, so it didn't help much.

from garmin-fit.

Ottomo1975 avatar Ottomo1975 commented on June 16, 2024

@mrihtar, i´ve change the date format in all 3 places ("fileDate", "dateCode" and "startDate") to the english 3 letter format (Sat ... Oct...) and now it works. Would it be possible to include this translation in your script?

from garmin-fit.

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.