diff options
Diffstat (limited to 'apps/weather_status/lib')
-rw-r--r-- | apps/weather_status/lib/Service/WeatherStatusService.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/weather_status/lib/Service/WeatherStatusService.php b/apps/weather_status/lib/Service/WeatherStatusService.php index fa3177b20f6..5b1d926f090 100644 --- a/apps/weather_status/lib/Service/WeatherStatusService.php +++ b/apps/weather_status/lib/Service/WeatherStatusService.php @@ -26,19 +26,19 @@ declare(strict_types=1); */ namespace OCA\WeatherStatus\Service; -use OCP\IConfig; -use OCP\IL10N; -use OCP\App\IAppManager; +use OCA\WeatherStatus\AppInfo\Application; use OCP\Accounts\IAccountManager; use OCP\Accounts\PropertyDoesNotExistException; -use OCP\IUserManager; -use OCP\Http\Client\IClientService; +use OCP\App\IAppManager; use OCP\Http\Client\IClient; -use OCP\ICacheFactory; +use OCP\Http\Client\IClientService; use OCP\ICache; +use OCP\ICacheFactory; +use OCP\IConfig; +use OCP\IL10N; use OCP\ILogger; -use OCA\WeatherStatus\AppInfo\Application; +use OCP\IUserManager; /** * Class WeatherStatusService @@ -426,8 +426,8 @@ class WeatherStatusService { $cacheDuration = 60 * 60; if (isset($headers['Expires']) && count($headers['Expires']) > 0) { // if the Expires response header is set, use it to define cache duration - $expireTs = (new \Datetime($headers['Expires'][0]))->getTimestamp(); - $nowTs = (new \Datetime())->getTimestamp(); + $expireTs = (new \DateTime($headers['Expires'][0]))->getTimestamp(); + $nowTs = (new \DateTime())->getTimestamp(); $duration = $expireTs - $nowTs; if ($duration > $cacheDuration) { $cacheDuration = $duration; |