Lines Matching refs:date

1084      * Validate a date
1086 * If $date isn't defined it is assumed to be the current date.
1088 * @param \DateTimeInterface|string $date optional
1091 public function validateDate($date = null)
1097 if (!isset($date)) {
1098 $date = new \DateTimeImmutable('now', new \DateTimeZone(@date_default_timezone_get()));
1107 if (is_string($date)) {
1108 $date = new \DateTimeImmutable($date, new \DateTimeZone(@date_default_timezone_get()));
1114 return $date >= $notBefore && $date <= $notAfter;
2521 * by choosing utcTime iff year of date given is before 2050 and generalTime else.
2523 * @param string $date in format date('D, d M Y H:i:s O')
2526 private function timeField($date)
2528 if ($date instanceof Element) {
2529 return $date;
2531 $dateObj = new \DateTimeImmutable($date, new \DateTimeZone('GMT'));
2534 return ['utcTime' => $date];
2536 return ['generalTime' => $date];
3032 * Set certificate start date
3034 * @param \DateTimeInterface|string $date
3036 public function setStartDate($date)
3038 if (!is_object($date) || !($date instanceof \DateTimeInterface)) {
3039 $date = new \DateTimeImmutable($date, new \DateTimeZone(@date_default_timezone_get()));
3042 $this->startDate = $date->format('D, d M Y H:i:s O');
3046 * Set certificate end date
3048 * @param \DateTimeInterface|string $date
3050 public function setEndDate($date)
3053 To indicate that a certificate has no well-defined expiration date,
3059 if (is_string($date) && strtolower($date) === 'lifetime') {
3064 if (!is_object($date) || !($date instanceof \DateTimeInterface)) {
3065 $date = new \DateTimeImmutable($date, new \DateTimeZone(@date_default_timezone_get()));
3068 $this->endDate = $date->format('D, d M Y H:i:s O');
3792 * @param string $date optional
3795 public function revoke($serial, $date = null)
3801 if (!empty($date)) {
3802 $rclist[$i]['revocationDate'] = $this->timeField($date);