summaryrefslogtreecommitdiffstats
path: root/lib/private/security
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-08-31 11:06:18 +0200
committerRobin Appelman <icewind@owncloud.com>2014-08-31 11:06:18 +0200
commitbfa0c4b78a977726971f7b48e8f921b8adb56e8b (patch)
treeccf7691447c95abdd51e24fa4715a37783d4d7b3 /lib/private/security
parent4bc9980f4be1ed9834768b613af6a6e43dc83556 (diff)
downloadnextcloud-server-bfa0c4b78a977726971f7b48e8f921b8adb56e8b.tar.gz
nextcloud-server-bfa0c4b78a977726971f7b48e8f921b8adb56e8b.zip
Explicitly set the timezones
Diffstat (limited to 'lib/private/security')
-rw-r--r--lib/private/security/certificate.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/security/certificate.php b/lib/private/security/certificate.php
index 63c02a124f4..778524507e0 100644
--- a/lib/private/security/certificate.php
+++ b/lib/private/security/certificate.php
@@ -35,12 +35,13 @@ class Certificate implements ICertificate {
public function __construct($data, $name) {
$this->name = $name;
try {
+ $gmt = new \DateTimeZone('GMT');
$info = openssl_x509_parse($data);
$this->commonName = isset($info['subject']['CN']) ? $info['subject']['CN'] : null;
$this->organization = isset($info['subject']['O']) ? $info['subject']['O'] : null;
$this->serial = $this->formatSerial($info['serialNumber']);
- $this->issueDate = new \DateTime('@' . $info['validFrom_time_t']);
- $this->expireDate = new \DateTime('@' . $info['validTo_time_t']);
+ $this->issueDate = new \DateTime('@' . $info['validFrom_time_t'], $gmt);
+ $this->expireDate = new \DateTime('@' . $info['validTo_time_t'], $gmt);
$this->issuerName = isset($info['issuer']['CN']) ? $info['issuer']['CN'] : null;
$this->issuerOrganization = isset($info['issuer']['O']) ? $info['issuer']['O'] : null;
} catch (\Exception $e) {