Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect dates in file index #16

Open
Tigge opened this issue May 14, 2012 · 8 comments
Open

Incorrect dates in file index #16

Tigge opened this issue May 14, 2012 · 8 comments

Comments

@Tigge
Copy link
Owner

Tigge commented May 14, 2012

The dates of the files in the index seems to be incorrect. Newer files seem to be more correct then older ones, and after a while my old files just seem to be from the same date. This is of course not correct and should be investigated.

The date inside of the FIT files are still correct.

(CC @rkistner)

@christofferholmstedt
Copy link
Contributor

I have the same issue. Cut-off date is the 29th of may 2012. I'm not sure but that might be the day I upgraded my Garmin Forerunner 610 firmware to 2.70...had 2.40 before.

On the 29th of may I have several activities between 08:31:58 and 08:35:26. 2 or 4 seconds between each activity.

@agiofws agiofws mentioned this issue Dec 6, 2012
@christofferholmstedt
Copy link
Contributor

Just got home from my winter vacation and I think all of my runs (not just the once from this vacation) on my watch are being downloaded again but now with a timestamp from the 22th of december 2012. I'll update this when I have downloaded all 146 of them. (At least Garmin-extractor is really stable now, no crashes but alot slower).

Using the d6f119e commit.

Any idea what could cause this and where I can start trying to find the fault?

@amcnabb
Copy link

amcnabb commented Jun 10, 2013

I'm having what seems to be the same problem. I'm getting dates that show up in the 1989-12-30 through 1990-01-01. If I upload it to the Garmin Connect web site, it shows the right dates, but Endomondo gives the wrong dates. I'm happy to share any logs or example files that might be helpful.

@potomak
Copy link

potomak commented Jun 25, 2013

I have the same issue with a Garmin Swim.

@potomak
Copy link

potomak commented Jun 25, 2013

I fixed the bug empirically, but this is only a dirty hack to push who really knows how the protocol works (@Tigge) to fix this bug.

File names are built using file_date attribute, see https://github.com/Tigge/Garmin-Forerunner-610-Extractor/blob/master/garmin.py#L157-160

file_date attribute is a datetime object built at https://github.com/Tigge/Garmin-Forerunner-610-Extractor/blob/master/ant/fs/file.py#L103 using the expression:

file_date  = datetime.datetime.fromtimestamp(file_date + 631065600)

I know exact dates of my workout sessions so I empirically extracted a working constant:

>>> import datetime
>>> import time
>>> real_workout_ts = time.mktime(datetime.datetime(2013, 6, 20, 19, 6).timetuple())
>>> real_workout_ts
1371747960.0
>>> wrong_workout_ts = time.mktime(datetime.datetime(1990, 1, 15, 11, 27).timetuple())
>>> wrong_workout_ts
632399220.0
>>> real_workout_ts - (wrong_workout_ts - 631065600)
1370414340.0

My last session was at 20th June 2013 at 7:06 PM and I compared it to the youngest file in the list dated at 15th January 1990 at 11:27 AM.

I changed the constant 631065600 with 1370414340 from the empirical result and now file names seem right.

@interskh
Copy link

Hmm this seems to happen to my 310xt as well.. All the old files are in wrong date but newer files are fine.

@pszypowicz
Copy link

garmin 910xt, happening to me as well

@waltersom
Copy link

I realise this hasn't been touched for a while, but I have had this problem* happen to me on several occasions. I thought maybe something had gotten corrupted, but now I think the common factor is the time zone has changed just before each problem. That is, I moved from New Zealand to England, or changed from eg NZDT to NZST, or BST to GMT.

*by problem, I mean antfs-cli redownloads all files on the watch, but the filenames have the current time (or maybe the time of the latest file), not the time from when those activities were recorded.

My watch is a Forerunner 610. I am assuming it's the same issue, judging by the other comments, but if not I'll raise another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants