diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index caa9726c..c4e19c04 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -2084,7 +2084,7 @@ class X509 } if (!isset($date)) { - $date = new DateTime($date, new DateTimeZone(date_default_timezone_get())); + $date = new DateTime($date, new DateTimeZone(@date_default_timezone_get())); } $notBefore = $this->currentCert['tbsCertificate']['validity']['notBefore']; @@ -3839,7 +3839,7 @@ class X509 $date = new DateTime($date); } - $this->startDate = $date->format('D, d M Y H:i:s O'); + $this->startDate = $date->format('D, d M Y H:i:s O', new DateTimeZone(@date_default_timezone_get())); } /** @@ -3867,7 +3867,7 @@ class X509 $date = new DateTime($date); } - $this->endDate = $date->format('D, d M Y H:i:s O'); + $this->endDate = $date->format('D, d M Y H:i:s O', new DateTimeZone(@date_default_timezone_get())); } }