Package gfit: Unify debug messages for easier reading.
[kraftakt.git] / gfitsync.go
index f913134..9eadde9 100644 (file)
@@ -209,6 +209,7 @@ func handleNotifications(ctx context.Context, payload []byte) error {
 
        for _, s := range subscriptions {
                if s.CollectionType != "activities" {
+                       log.Warningf(ctx, "ignoring collection type %q", s.CollectionType)
                        continue
                }
 
@@ -329,7 +330,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