Fixed timezone problem in unit tests

This commit is contained in:
Constantin Graf
2024-09-30 10:58:33 +02:00
committed by Constantin Graf
parent 8b50f33cc9
commit 78ea8a673b
4 changed files with 13 additions and 10 deletions

View File

@@ -147,8 +147,8 @@ class TimeEntryFactory extends Factory
{
return $this->state(function (array $attributes) use ($start, $durationInSeconds): array {
return [
'start' => $start->utc(),
'end' => $start->copy()->addSeconds($durationInSeconds),
'start' => $start->copy()->utc(),
'end' => $start->copy()->utc()->addSeconds($durationInSeconds),
];
});
}
@@ -157,7 +157,7 @@ class TimeEntryFactory extends Factory
{
return $this->state(function (array $attributes) use ($start): array {
return [
'start' => $start->utc(),
'start' => $start->copy()->utc(),
];
});
}