at(0)->asTime()); $na = Time::fromASN1($seq->at(1)->asTime()); return self::create($nb, $na); } /** * Initialize from date strings. * * @param null|string $nb_date Not before date * @param null|string $na_date Not after date * @param null|string $tz Timezone string */ public static function fromStrings(?string $nb_date, ?string $na_date, ?string $tz = null): self { return self::create(Time::fromString($nb_date, $tz), Time::fromString($na_date, $tz)); } /** * Get not before time. */ public function notBefore(): Time { return $this->notBefore; } /** * Get not after time. */ public function notAfter(): Time { return $this->notAfter; } /** * Generate ASN.1 structure. */ public function toASN1(): Sequence { return Sequence::create($this->notBefore->toASN1(), $this->notAfter->toASN1()); } }