mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-30 04:39:02 +01: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)
|
||||
{
|
||||
if (class_exists('DateTime')) {
|
||||
$date = new DateTime($date);
|
||||
$this->startDate = $date->format('D, d M Y H:i:s O', new DateTimeZone(@date_default_timezone_get()));
|
||||
$date = new DateTime($date, new DateTimeZone(@date_default_timezone_get()));
|
||||
$this->startDate = $date->format('D, d M Y H:i:s O');
|
||||
} else {
|
||||
$this->startDate = @date('D, d M Y H:i:s O', @strtotime($date));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user