Private
Public Access
1
0

Ensure all dates returned are ISO8601

This commit is contained in:
James Magahern
2024-01-05 16:26:19 -08:00
parent a8043e53b3
commit 831636216d
8 changed files with 53 additions and 24 deletions

View File

@@ -336,7 +336,7 @@ func GenerateRandomConversation() model.Conversation {
Participants: []string{GenerateRandomName()},
UnreadCount: 0,
Guid: uuid.New().String(),
Date: time.Now().Add(-1 * time.Duration(rand.Intn(1000000)) * time.Second),
Date: model.Date(time.Now().Add(-1 * time.Duration(rand.Intn(1000000)) * time.Second)),
}
return conversation
@@ -355,7 +355,7 @@ func GenerateRandomMessage(participants []string) model.Message {
return model.Message{
Text: GenerateRandomMessageBody(),
Guid: uuid.New().String(),
Date: time.Now().Add(-1 * time.Duration(rand.Intn(1000000)) * time.Second),
Date: model.Date(time.Now().Add(-1 * time.Duration(rand.Intn(1000000)) * time.Second)),
Sender: sender,
}
}