Render modified timestamp as seconds since Epoch 46/3846/1
authorAndrew Gauld <agauld@att.com>
Tue, 26 Feb 2019 21:03:25 +0000 (21:03 +0000)
committerAndrew Gauld <agauld@att.com>
Tue, 26 Feb 2019 21:05:41 +0000 (21:05 +0000)
Change-Id: Id6f26908fc6232d6d42e843f4062a6c46e290f09
Issue-ID: ACUMOS-2570
Signed-off-by: Andrew Gauld <agauld@att.com>
docs/release-notes.rst
gateway/src/main/java/org/acumos/federation/gateway/adapter/PeerGateway.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/ONAP.java

index 937dd5f..e3c79d8 100644 (file)
@@ -29,7 +29,9 @@ Version 2.0.1, 2019-02-26
 * Add catalogId field in solution search selector (`ACUMOS-2285 <https://jira.acumos.org/browse/ACUMOS-2285>`_)
 * Normalize configured Nexus URL to have exactly one trailing slash (`ACUMOS-2554 <https://jira.acumos.org/browse/ACUMOS-2554>`_)
 * Allow server to run as unprivileged user (`ACUMOS-2551 <https://jira.acumos.org/browse/ACUMOS-2551>`_)
-* List dependency on jersey-hk2 for spring-boot (`ACUMOS-2570 <https://jira.acumos.org/browse/ACUMOS-2570>`_)
+* Various problems found with version 2.0.0 (`ACUMOS-2570 <https://jira.acumos.org/browse/ACUMOS-2570>`_)
+  - List dependency on jersey-hk2 for spring-boot
+  - Instant rendered as JSON object rather than seconds since epoch
 
 Version 2.0.0, 2019-02-20
 -------------------------
index c1cc7d4..37b15d2 100644 (file)
@@ -171,7 +171,7 @@ public class PeerGateway {
                        }
                        Instant lastProcessed = this.sub.getProcessed();
                        if (lastProcessed != null) {
-                               selector.put("modified", lastProcessed);
+                               selector.put("modified", lastProcessed.getEpochSecond());
                        }
                        lastProcessed = Instant.now();
                        
index c94b0d0..4dfde97 100644 (file)
@@ -156,7 +156,7 @@ public class ONAP {
                        }
                        Instant lastProcessed = this.sub.getProcessed();
                        if (lastProcessed != null) {
-                               selector.put("modified", lastProcessed);
+                               selector.put("modified", lastProcessed.getEpochSecond());
                        }
                        lastProcessed = Instant.now();