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:
Kevin Adametz 2026-06-18 12:40:19 +00:00
parent 028b059975
commit 5feaa8a36a
12 changed files with 56 additions and 68 deletions

View file

@ -26,13 +26,6 @@ class PressRelease extends Model
/** @use HasFactory<PressReleaseFactory> */
use HasFactory, HasUniqueSlug, SoftDeletes;
/**
* Anzeige-Zeitzone für vom Nutzer erfasste Termine (scheduled_at,
* embargo_at). In der Datenbank wird weiterhin UTC gespeichert
* (config app.timezone).
*/
public const DISPLAY_TIMEZONE = 'Europe/Berlin';
/**
* @return list<string>
*/
@ -113,19 +106,20 @@ class PressRelease extends Model
}
/**
* Geplanter Veröffentlichungstermin in der Anzeige-Zeitzone (Europe/Berlin).
* Geplanter Veröffentlichungstermin. Die Anwendung läuft durchgängig in
* Europe/Berlin (config app.timezone), daher ist keine Umrechnung nötig.
*/
public function scheduledAtLocal(): ?Carbon
{
return $this->scheduled_at?->copy()->setTimezone(self::DISPLAY_TIMEZONE);
return $this->scheduled_at;
}
/**
* Sperrfrist (Embargo) in der Anzeige-Zeitzone (Europe/Berlin).
* Sperrfrist (Embargo) in der Anwendungs-Zeitzone (Europe/Berlin).
*/
public function embargoAtLocal(): ?Carbon
{
return $this->embargo_at?->copy()->setTimezone(self::DISPLAY_TIMEZONE);
return $this->embargo_at;
}
public function user(): BelongsTo