Coffee journaling on ATProto (alpha) alpha.arabica.social
coffee
17
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: fix recipe timestamp issue affecting feed

+6 -6
+1 -1
internal/atproto/store.go
··· 1729 1729 WaterAmount: req.WaterAmount, 1730 1730 Notes: req.Notes, 1731 1731 SourceRef: req.SourceRef, 1732 - CreatedAt: time.Now(), 1732 + CreatedAt: time.Now().UTC(), 1733 1733 } 1734 1734 if len(req.Pours) > 0 { 1735 1735 recipeModel.Pours = make([]*models.Pour, len(req.Pours))
+5 -5
internal/firehose/index.go
··· 423 423 424 424 // Parse createdAt from record 425 425 var recordData map[string]any 426 - createdAt := time.Now() 426 + createdAt := time.Now().UTC() 427 427 if err := json.Unmarshal(record, &recordData); err == nil { 428 428 if createdAtStr, ok := recordData["createdAt"].(string); ok { 429 429 if t, err := time.Parse(time.RFC3339, createdAtStr); err == nil { 430 - createdAt = t 430 + createdAt = t.UTC() 431 431 } 432 432 } 433 433 } 434 434 435 - now := time.Now() 435 + now := time.Now().UTC() 436 436 437 437 _, err := idx.db.ExecContext(ctx, stmt, uri, did, collection, rkey, string(record), cid, 438 438 now.Format(time.RFC3339Nano), createdAt.Format(time.RFC3339Nano)) ··· 499 499 } 500 500 defer stmt.Close() 501 501 502 - now := time.Now() 502 + now := time.Now().UTC() 503 503 seenDIDs := make(map[string]struct{}) 504 504 505 505 for _, rec := range records { ··· 510 510 if err := json.Unmarshal(rec.Record, &recordData); err == nil { 511 511 if createdAtStr, ok := recordData["createdAt"].(string); ok { 512 512 if t, err := time.Parse(time.RFC3339, createdAtStr); err == nil { 513 - createdAt = t 513 + createdAt = t.UTC() 514 514 } 515 515 } 516 516 }