Ensure all dates returned are ISO8601
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user