* Added format for due_at to circumvent the limitation of the Trend class.

This commit is contained in:
2025-05-12 11:00:04 +02:00
parent dcddefa4cd
commit c88975d48f

View File

@@ -25,10 +25,12 @@ class RemainderFactory extends Factory
false => null false => null
}; };
return [ return [
'discord_user_id' => DiscordUser::factory(), 'discord_user_id' => DiscordUser::factory(),
'channel_id' => $channel_id, 'channel_id' => $channel_id,
'due_at' => $this->faker->dateTimeBetween('now', '+1 year'), //NOTE: Trend does not play well with the default DateTime format (ex.: 2025-05-12T08:18:51.000000Z)
'due_at' => $this->faker->dateTimeBetween('now', '+1 year')->format('Y-m-d H:i:s'),
'message' => $this->faker->realText(32), 'message' => $this->faker->realText(32),
'status' => RemainderStatus::NEW->value, 'status' => RemainderStatus::NEW->value,
]; ];