parseYmdHisAsTimezone($timestamp, $tz); if ($parsed === null) { continue; } if (abs($now - $parsed) <= self::FRESHNESS_WINDOW_SECONDS) { return true; } } return false; } /** * 14자리 yyyyMMddHHmmss 를 지정 timezone 으로 파싱. * * @return int|null Unix epoch, 파싱 실패 시 null */ private function parseYmdHisAsTimezone(string $timestamp, string $timezone): ?int { try { return Carbon::createFromFormat('YmdHis', $timestamp, $timezone)->getTimestamp(); } catch (\Exception) { return null; } } }