Zeitzone Europe/Berlin: unnoetige UTC-Konvertierung entfernt
Beim Speichern/Veroeffentlichen waren Termine 2 Stunden versetzt: die App-Zeitzone stand auf UTC, Termine wurden nach UTC umgerechnet, aber published_at roh angezeigt. - config/app.php: timezone UTC -> Europe/Berlin - PressRelease: DISPLAY_TIMEZONE + setTimezone-Umrechnung entfernt - Admin-/Customer-Formulare: scheduledAtUtc() -> resolveScheduledAt(), parst direkt in App-Zeitzone; Edit-Hydration ohne setTimezone - ProofPdfRenderer + Boost-Anzeige: setTimezone entfernt - Tests an verschiebungsfreies Verhalten angepasst Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
028b059975
commit
5feaa8a36a
12 changed files with 56 additions and 68 deletions
|
|
@ -52,10 +52,9 @@ test('create form persistiert scheduled_at aus datum und uhrzeit ohne embargo',
|
|||
|
||||
$pr = PressRelease::query()->latest('id')->firstOrFail();
|
||||
|
||||
// Eingabe 14:30 erfolgt in Europe/Berlin (CEST, +02:00) und wird als
|
||||
// 12:30 UTC gespeichert.
|
||||
expect($pr->scheduled_at?->toDateTimeString())->toBe('2026-06-05 12:30:00');
|
||||
expect($pr->scheduled_at?->copy()->setTimezone('Europe/Berlin')->format('Y-m-d H:i'))->toBe('2026-06-05 14:30');
|
||||
// Die App läuft in Europe/Berlin; die Eingabe 14:30 wird ohne Umrechnung
|
||||
// als 14:30 gespeichert.
|
||||
expect($pr->scheduled_at?->toDateTimeString())->toBe('2026-06-05 14:30:00');
|
||||
expect($pr->embargo_at)->toBeNull();
|
||||
});
|
||||
|
||||
|
|
@ -122,9 +121,8 @@ test('edit form hydriert scheduled_at in datum und uhrzeit ohne embargo', functi
|
|||
'category_id' => $category->id,
|
||||
'portal' => $company->portal->value,
|
||||
'status' => 'draft',
|
||||
// 12:30 UTC entspricht 14:30 in Europe/Berlin (CEST) – so wird der
|
||||
// Termin in den Eingabefeldern angezeigt.
|
||||
'scheduled_at' => '2026-06-05 12:30:00',
|
||||
// Wert wird unverändert (Europe/Berlin) in den Eingabefeldern angezeigt.
|
||||
'scheduled_at' => '2026-06-05 14:30:00',
|
||||
'embargo_at' => '2026-06-10 08:00:00',
|
||||
]);
|
||||
$pr->contacts()->sync([$contact->id]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue