Fix parsing of activity times.
authorFlorian Forster <ff@octo.it>
Sun, 28 Jan 2018 19:54:45 +0000 (20:54 +0100)
committerFlorian Forster <ff@octo.it>
Sun, 28 Jan 2018 19:54:45 +0000 (20:54 +0100)
gfitsync.go

index f913134..2c9a54b 100644 (file)
@@ -329,7 +329,7 @@ func handleNotification(ctx context.Context, s *fitbit.Subscription) error {
                                continue
                        }
 
-                       startTime, err := time.ParseInLocation("2006-01-02T15:04:05", a.StartDate+"T"+a.StartTime, profile.Timezone)
+                       startTime, err := time.ParseInLocation("2006-01-02T15:04", a.StartDate+"T"+a.StartTime, profile.Timezone)
                        if err != nil {
                                errs = append(errs, fmt.Errorf("gfitClient.SetActivities() = %v", err))
                                return