local()->format('Y-m-d\TH:i') ?? ''; } /** * What a person typed into such a field, as UTC for storage. * * Returns null for anything unusable rather than throwing: these fields * are read on every keystroke, and half of "2026-07-2" is normal. */ public static function fromField(string $value): ?Carbon { if (trim($value) === '') { return null; } try { // Parsed IN the display zone — the string carries no offset, so // without this it would be read as UTC and silently shifted. return Carbon::parse($value, config('app.display_timezone'))->utc(); } catch (\Throwable) { return null; } } }