From 1f6af77fff02d227c0638bdb8dd6efebca80e7ce Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 28 Aug 2016 08:56:45 +0200 Subject: only pad old timestamps --- lib/Controller/ItemApiController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Controller') diff --git a/lib/Controller/ItemApiController.php b/lib/Controller/ItemApiController.php index 98342cd26..13ead4285 100644 --- a/lib/Controller/ItemApiController.php +++ b/lib/Controller/ItemApiController.php @@ -75,7 +75,11 @@ class ItemApiController extends ApiController { */ public function updated($type=3, $id=0, $lastModified=0) { // needs to be turned into a millisecond timestamp to work properly - $paddedLastModified = $lastModified . '000000'; + if (strlen((string) $lastModified) <= 10) { + $paddedLastModified = $lastModified . '000000'; + } else { + $paddedLastModified = $lastModified; + } return $this->serializer->serialize( $this->itemService->findAllNew($id, $type, $paddedLastModified, true, $this->userId) -- cgit v1.2.3