summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-08-28 08:56:45 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-08-28 08:56:45 +0200
commit1f6af77fff02d227c0638bdb8dd6efebca80e7ce (patch)
treeabc80365f1dffaaf355bc2d78308df9d361994b1
parente356676d851b9176b6024b65c2ce3e616e143716 (diff)
only pad old timestamps
-rw-r--r--lib/Controller/ItemApiController.php6
1 files changed, 5 insertions, 1 deletions
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)