1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-27 04:34:45 +01:00

Update date format in File/X509.php

Update it to be consistent with bdd42c448b

Thanks runaway518!
This commit is contained in:
terrafrost 2013-02-05 07:53:36 -06:00
parent 13eb688c90
commit 5910f7c14f

View File

@ -3156,8 +3156,8 @@ class File_X509 {
return false; return false;
} }
$startDate = !empty($this->startDate) ? $this->startDate : @date('M j H:i:s Y T'); $startDate = !empty($this->startDate) ? $this->startDate : @date('D, d M y H:i:s O');
$endDate = !empty($this->endDate) ? $this->endDate : @date('M j H:i:s Y T', strtotime('+1 year')); $endDate = !empty($this->endDate) ? $this->endDate : @date('D, d M y H:i:s O', strtotime('+1 year'));
$serialNumber = !empty($this->serialNumber) ? $this->serialNumber : new Math_BigInteger(); $serialNumber = !empty($this->serialNumber) ? $this->serialNumber : new Math_BigInteger();
$this->currentCert = array( $this->currentCert = array(
@ -3329,7 +3329,7 @@ class File_X509 {
$currentCert = isset($this->currentCert) ? $this->currentCert : NULL; $currentCert = isset($this->currentCert) ? $this->currentCert : NULL;
$signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : NULL; $signatureSubject = isset($this->signatureSubject) ? $this->signatureSubject : NULL;
$thisUpdate = !empty($this->startDate) ? $this->startDate : @date('M j H:i:s Y T'); $thisUpdate = !empty($this->startDate) ? $this->startDate : @date('D, d M y H:i:s O');
if (isset($crl->currentCert) && is_array($crl->currentCert) && isset($crl->currentCert['tbsCertList'])) { if (isset($crl->currentCert) && is_array($crl->currentCert) && isset($crl->currentCert['tbsCertList'])) {
$this->currentCert = $crl->currentCert; $this->currentCert = $crl->currentCert;
@ -3479,7 +3479,7 @@ class File_X509 {
*/ */
function setStartDate($date) function setStartDate($date)
{ {
$this->startDate = @date('M j H:i:s Y T', @strtotime($date)); $this->startDate = @date('D, d M y H:i:s O', @strtotime($date));
} }
/** /**
@ -3503,7 +3503,7 @@ class File_X509 {
$temp = chr(FILE_ASN1_TYPE_GENERALIZED_TIME) . $asn1->_encodeLength(strlen($temp)) . $temp; $temp = chr(FILE_ASN1_TYPE_GENERALIZED_TIME) . $asn1->_encodeLength(strlen($temp)) . $temp;
$this->endDate = new File_ASN1_Element($temp); $this->endDate = new File_ASN1_Element($temp);
} else { } else {
$this->endDate = @date('M j H:i:s Y T', @strtotime($date)); $this->endDate = @date('D, d M y H:i:s O', @strtotime($date));
} }
} }
@ -4131,7 +4131,7 @@ class File_X509 {
$i = count($rclist); $i = count($rclist);
$rclist[] = array('userCertificate' => $serial, $rclist[] = array('userCertificate' => $serial,
'revocationDate' => array('generalTime' => @date('M j H:i:s Y T'))); 'revocationDate' => array('generalTime' => @date('D, d M y H:i:s O')));
return $i; return $i;
} }