summaryrefslogtreecommitdiffstats
path: root/lib/public
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 /lib/public
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 'lib/public')
-rw-r--r--lib/public/AppFramework/Http/Response.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index e28fa0b2c81..ee10d483b25 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -115,7 +115,7 @@ class Response {
$time = \OC::$server->query(ITimeFactory::class);
$expires->setTimestamp($time->getTime());
$expires->add(new \DateInterval('PT'.$cacheSeconds.'S'));
- $this->addHeader('Expires', $expires->format(\DateTime::RFC2822));
+ $this->addHeader('Expires', $expires->format(\DateTimeInterface::RFC2822));
} else {
$this->addHeader('Cache-Control', 'no-cache, no-store, must-revalidate');
unset($this->headers['Expires'], $this->headers['Pragma']);
@@ -244,7 +244,7 @@ class Response {
if ($this->lastModified) {
$mergeWith['Last-Modified'] =
- $this->lastModified->format(\DateTime::RFC2822);
+ $this->lastModified->format(\DateTimeInterface::RFC2822);
}
$this->headers['Content-Security-Policy'] = $this->getContentSecurityPolicy()->buildPolicy();