summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2021-06-23 09:56:28 -0700
committerGitHub <noreply@github.com>2021-06-23 09:56:28 -0700
commit9ed379da22e4dd0b54fed4241798aec47d6e3f2c (patch)
tree279fb154fc813240ba34fa4cbbe525e9627e76b5 /core
parent19a84512d688ae899f0f8efc37b89d2a9676cc48 (diff)
parent6d5cfe0c66f7010d552f0aa234a13c2e91a933bd (diff)
downloadnextcloud-server-9ed379da22e4dd0b54fed4241798aec47d6e3f2c.tar.gz
nextcloud-server-9ed379da22e4dd0b54fed4241798aec47d6e3f2c.zip
Merge pull request #27635 from nextcloud/fix/datetime-constants
Fix usage of DateTime constants
Diffstat (limited to 'core')
-rw-r--r--core/Command/Security/ListCertificates.php4
-rw-r--r--core/Command/User/Info.php2
-rw-r--r--core/Command/User/ListCommand.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/core/Command/Security/ListCertificates.php b/core/Command/Security/ListCertificates.php
index 9a96d98e53f..9a99a2f6db6 100644
--- a/core/Command/Security/ListCertificates.php
+++ b/core/Command/Security/ListCertificates.php
@@ -58,10 +58,10 @@ class ListCertificates extends Base {
'name' => $certificate->getName(),
'common_name' => $certificate->getCommonName(),
'organization' => $certificate->getOrganization(),
- 'expire' => $certificate->getExpireDate()->format(\DateTime::ATOM),
+ 'expire' => $certificate->getExpireDate()->format(\DateTimeInterface::ATOM),
'issuer' => $certificate->getIssuerName(),
'issuer_organization' => $certificate->getIssuerOrganization(),
- 'issue_date' => $certificate->getIssueDate()->format(\DateTime::ATOM)
+ 'issue_date' => $certificate->getIssueDate()->format(\DateTimeInterface::ATOM)
];
}, $this->certificateManager->listCertificates());
if ($outputType === self::OUTPUT_FORMAT_JSON) {
diff --git a/core/Command/User/Info.php b/core/Command/User/Info.php
index eff13378278..e6ba691a40d 100644
--- a/core/Command/User/Info.php
+++ b/core/Command/User/Info.php
@@ -80,7 +80,7 @@ class Info extends Base {
'enabled' => $user->isEnabled(),
'groups' => $groups,
'quota' => $user->getQuota(),
- 'last_seen' => date(\DateTime::ATOM, $user->getLastLogin()), // ISO-8601
+ 'last_seen' => date(\DateTimeInterface::ATOM, $user->getLastLogin()), // ISO-8601
'user_directory' => $user->getHome(),
'backend' => $user->getBackendClassName()
];
diff --git a/core/Command/User/ListCommand.php b/core/Command/User/ListCommand.php
index a30b1cae118..3a2708d4da2 100644
--- a/core/Command/User/ListCommand.php
+++ b/core/Command/User/ListCommand.php
@@ -109,7 +109,7 @@ class ListCommand extends Base {
'enabled' => $user->isEnabled(),
'groups' => $groups,
'quota' => $user->getQuota(),
- 'last_seen' => date(\DateTime::ATOM, $user->getLastLogin()), // ISO-8601
+ 'last_seen' => date(\DateTimeInterface::ATOM, $user->getLastLogin()), // ISO-8601
'user_directory' => $user->getHome(),
'backend' => $user->getBackendClassName()
];