Results 1 to 7 of 7

Thread: Bryton cycling tracker date shows year 2000 from epoch time instead of 2020 .fit file

  1. #1
    Potential Tuner
    Join Date
    May 2020
    Posts
    5

    Bryton cycling tracker date shows year 2000 from epoch time instead of 2020 .fit file

    Hi, Not sure if anyone else has come across this before. I am trying to get RR to read my data file correctly for the date and time. I have a Bryton rider 15 cycling computer as a data tracker. RR reads the data file which is .fit format, I believe it is the same a Garmin. All data seems to be fine apart from the date and time. For a data file recorded this year it displays the date as year 2000, the month and day are wrong also. 2005211752 Bryton data file.zip.txt I have attached a small sample file, rename it to .zip from .txt then extract to view it. It contains 2 files. one is the .fit file from the device, the other is a GPX export of the same file for comparison. The main reason I wish to use the .fit file is because it also has recorded speed. not a huge problem but would be nice if I could use just 1 file access all of the data.
    it looks like a problem with RR reading the epoch time from the .fit file. when I upload to strava it appears correctly. The gpx is exported from strava and has the correct date and time, it is readable as a text file, but not recorded speed as mentioned.
    Does anyone have an idea?
    Can the Devs take a look and see if it is fixable?
    Does the .fit file from a Garmin device have the same issue? I don't have a garmin file to test with.
    Thanks in advance for any help.

  2. #2
    Quote Originally Posted by Brendon View Post
    Hi, Not sure if anyone else has come across this before. I am trying to get RR to read my data file correctly for the date and time. I have a Bryton rider 15 cycling computer as a data tracker. RR reads the data file which is .fit format, I believe it is the same a Garmin. All data seems to be fine apart from the date and time. For a data file recorded this year it displays the date as year 2000, the month and day are wrong also. 2005211752 Bryton data file.zip.txt I have attached a small sample file, rename it to .zip from .txt then extract to view it. It contains 2 files. one is the .fit file from the device, the other is a GPX export of the same file for comparison. The main reason I wish to use the .fit file is because it also has recorded speed. not a huge problem but would be nice if I could use just 1 file access all of the data.
    it looks like a problem with RR reading the epoch time from the .fit file. when I upload to strava it appears correctly. The gpx is exported from strava and has the correct date and time, it is readable as a text file, but not recorded speed as mentioned.
    Does anyone have an idea?
    Can the Devs take a look and see if it is fixable?
    Does the .fit file from a Garmin device have the same issue? I don't have a garmin file to test with.
    Thanks in advance for any help.
    Try using this object:
    _Timer - Date and Time - FIT.rro

    It looks like the .fit file is counting time since 2019-12-31; so, I adjusted the BaseEpochYear in the background script and the DaysElapsed in the foreground script (in addition to some previous logic updates so that it will work at the end of each month too). You'll need to adjust the BaseEpochYear to 2021 next year if you record data then (assuming that however RaceRender is parsing the .fit files that the year is somehow getting truncated), but this should work until then at least.

  3. #3
    Potential Tuner
    Join Date
    May 2020
    Posts
    5
    Quote Originally Posted by HoboBob View Post
    Try using this object:
    _Timer - Date and Time - FIT.rro

    It looks like the .fit file is counting time since 2019-12-31; so, I adjusted the BaseEpochYear in the background script and the DaysElapsed in the foreground script (in addition to some previous logic updates so that it will work at the end of each month too). You'll need to adjust the BaseEpochYear to 2021 next year if you record data then (assuming that however RaceRender is parsing the .fit files that the year is somehow getting truncated), but this should work until then at least.
    Thank you HoboBob, The file you provided works well.
    After looking further I think RR is not parsing the file correctly.
    I set up a few fields displaying data from the different data files to match the date and time together. I did this by displaying and matching Longitude and Latitude in the different data files, FIT and GPX. Same location = same time.
    For the date May 3 2020 17:23:23 in RaceRender the FIT file epoch Time reads 957457403 but should be 1588526603. Maybe you did something similar to figure out how to adjust the file for me?
    To confirm that it is not my data logger or the file I can open them in the program GPXsee and when the mouse pointer hovers over the tracking line it displays the correct date and time.
    Thanks again for your help it has allowed me to display what i wanted easily. I hope it can be fixed properly in the RR program so the epoch number is displayed correctly.

  4. #4
    Potential Tuner
    Join Date
    May 2020
    Posts
    5
    Update: i did some more searching. It looks like they don't use epoch time. it uses seconds since UTC 00:00 Dec 31 1989.
    So the number being provided by the FIT file minus seconds between 1989 and 2000 might get the correct date and time.
    This link might help. https://stackoverflow.com/questions/...file-timestamp
    I think the calculated difference between epoch time and the time displayed by the FIT file is -631,069,200

    I just don't know how to fix it.
    Maybe you'll have a better idea, at least there's a starting point now.

  5. #5
    Potential Tuner
    Join Date
    May 2020
    Posts
    5
    I think this has fixed it for FIT files

    Edit: I adjusted a FIT file with online tools to 00:00 Jan 1 2000 and put that number as the base epoch number for 2000

    BaseEpochSeconds = 315619240; // 00:00:00 Jan 1, 2000 UTC
    BaseEpochYear = 2000; // This needs to be a leap year (ie divisible by 4)
    Last edited by Brendon; 2 Weeks Ago at 10:43 PM.

  6. #6
    Quote Originally Posted by Brendon View Post
    I think this has fixed it for FIT files

    Edit: I adjusted a FIT file with online tools to 00:00 Jan 1 2000 and put that number as the base epoch number for 2000

    BaseEpochSeconds = 315619240; // 00:00:00 Jan 1, 2000 UTC
    BaseEpochYear = 2000; // This needs to be a leap year (ie divisible by 4)
    Nice! Yeah, it definitely seems like RaceRender isn't parsing it exactly correctly, but as long as you line up the adjusted value to what the Display Object is expecting, then that should be all that you need to do.

  7. #7
    Potential Tuner
    Join Date
    May 2020
    Posts
    5

    Thumbs up

    Quote Originally Posted by HoboBob View Post
    Nice! Yeah, it definitely seems like RaceRender isn't parsing it exactly correctly, but as long as you line up the adjusted value to what the Display Object is expecting, then that should be all that you need to do.
    Yep, it's definitely working now with the adjustment.
    RaceRender is parsing the number correctly.
    the problem was caused by the tracker using a different starting date, they don't use epoch time. it uses seconds since UTC 00:00 Dec 31 1989.