Sort the activities downloaded from Strava by their id's thus they are uploaded to Garmin from the oldest to the latest. Otherwise, the latest one is uploaded first, and if the process is interrupted, any activities older than it will never be uploaded because the code before this line gets the latest activity from Garmin and only download those newer than it from Strava.
Sort the activities downloaded from Strava by their id's thus they are uploaded to Garmin from the oldest to the latest. Otherwise, the latest one is uploaded first, and if the process is interrupted, any activities older than it will never be uploaded because the code before this line gets the latest activity from Garmin and only download those newer than it from Strava.