mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-24 23:58:29 +00:00
X509: fix issues when using datetime without a timezone set in ini
This commit is contained in:
parent
b6d0e37432
commit
6f47ef808e
@ -3908,8 +3908,8 @@ class File_X509
|
|||||||
function setStartDate($date)
|
function setStartDate($date)
|
||||||
{
|
{
|
||||||
if (class_exists('DateTime')) {
|
if (class_exists('DateTime')) {
|
||||||
$date = new DateTime($date);
|
$date = new DateTime($date, new DateTimeZone(@date_default_timezone_get()));
|
||||||
$this->startDate = $date->format('D, d M Y H:i:s O', new DateTimeZone(@date_default_timezone_get()));
|
$this->startDate = $date->format('D, d M Y H:i:s O');
|
||||||
} else {
|
} else {
|
||||||
$this->startDate = @date('D, d M Y H:i:s O', @strtotime($date));
|
$this->startDate = @date('D, d M Y H:i:s O', @strtotime($date));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user