diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index ac917ce4..d1d46812 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -2793,8 +2793,7 @@ class X509 $date = new DateTime($date); } - $date->setTimezone(new DateTimeZone(@date_default_timezone_get())); - $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())); } /** @@ -2821,8 +2820,7 @@ class X509 $date = new DateTime($date); } - $date->setTimezone(new DateTimeZone(@date_default_timezone_get())); - $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())); } }