summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-08-23 20:07:40 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-08-23 20:07:40 +0200
commit360a9f3054d7e25c6a5c9b1917ec33e794765c7d (patch)
tree3f16a66d19fd80e5eea3e6c9dadfb98a9b4dc645
parent4ff179dc802b2a899b2174f5bc5eedb871804d80 (diff)
Fix #209.0.2
-rw-r--r--CHANGELOG.md3
-rw-r--r--appinfo/info.xml2
-rw-r--r--lib/Db/Item.php2
-rw-r--r--tests/Unit/Db/ItemTest.php4
4 files changed, 7 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa44007d0..409f3e804 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+news (9.0.2)
+* **Bugfix**: Do not return millisecond lastModified timestamps in API, #20
+
news (9.0.1)
* **Enhancement**: Drop PHP 64bit requirement due to helpful suggestions
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 1a1ac80f5..479391528 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -3,7 +3,7 @@
<id>news</id>
<name>News</name>
<description>An RSS/Atom feed reader</description>
- <version>9.0.1</version>
+ <version>9.0.2</version>
<licence>agpl</licence>
<author>Bernhard Posselt</author>
<author>Alessandro Cosentino</author>
diff --git a/lib/Db/Item.php b/lib/Db/Item.php
index d3f9efc40..1909019c1 100644
--- a/lib/Db/Item.php
+++ b/lib/Db/Item.php
@@ -150,7 +150,7 @@ class Item extends Entity implements IAPI, \JsonSerializable {
'feedId' => $this->getFeedId(),
'unread' => $this->isUnread(),
'starred' => $this->isStarred(),
- 'lastModified' => $this->getLastModified(),
+ 'lastModified' => (int) substr($this->getLastModified(), 0, -6),
'rtl' => $this->getRtl(),
'fingerprint' => $this->getFingerprint(),
'contentHash' => $this->getContentHash()
diff --git a/tests/Unit/Db/ItemTest.php b/tests/Unit/Db/ItemTest.php
index a99813a65..bdc0793a2 100644
--- a/tests/Unit/Db/ItemTest.php
+++ b/tests/Unit/Db/ItemTest.php
@@ -69,7 +69,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase {
$item->setStatus(0);
$item->setUnread();
$item->setStarred();
- $item->setLastModified(321);
+ $item->setLastModified('1111111111234567');
$item->setFingerprint('fingerprint');
$item->setContentHash('contentHash');
@@ -87,7 +87,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase {
'feedId' => 1,
'unread' => true,
'starred' => true,
- 'lastModified' => 321,
+ 'lastModified' => 1111111111,
'rtl' => true,
'fingerprint' => 'fingerprint',
'contentHash' => 'contentHash'