File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
datastore/src/main/java/io/spine/server/storage/datastore Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 4141import static com .google .cloud .datastore .StructuredQuery .OrderBy .asc ;
4242import static com .google .cloud .datastore .StructuredQuery .PropertyFilter .eq ;
4343import static com .google .common .base .Preconditions .checkNotNull ;
44+ import static com .google .protobuf .util .Timestamps .toNanos ;
4445import static io .spine .server .delivery .InboxMessageStatus .TO_DELIVER ;
4546
4647/**
@@ -50,8 +51,6 @@ public class DsInboxStorage
5051 extends DsMessageStorage <InboxMessageId , InboxMessage , InboxReadRequest >
5152 implements InboxStorage {
5253
53- private static final int NANOS_PER_SECOND = 1_000_000 ;
54-
5554 protected DsInboxStorage (DatastoreWrapper datastore , boolean multitenant ) {
5655 super (datastore , multitenant );
5756 }
@@ -150,8 +149,7 @@ private enum Column implements MessageColumn<InboxMessage> {
150149
151150 receivedAt ("received_at" , (m ) -> {
152151 Timestamp timestamp = m .getWhenReceived ();
153- long epochNanos = timestamp .getSeconds () * NANOS_PER_SECOND + timestamp .getNanos ();
154- return LongValue .of (epochNanos );
152+ return LongValue .of (toNanos (timestamp ));
155153 }),
156154
157155 version ("version" , (m ) -> {
You can’t perform that action at this time.
0 commit comments