I have a table in my database with *createdAt*, *updatedAt, *and
*deletedAt *date columns and I want to send them to client in a proper
format. I know there is a type for " timestamp" which google provides
as google.protobuf.Timestamp. AFAIK when you use google.protobuf.Timestamp
you have to format it like this
"{ seconds: 0, nanos: 0 }", and for example if we want to convert it to a
JavaScript date object we'd have to do "new Date(seconds * 1000 +
Math.round(nanos
/ 1e6))"
So I was wondering what is the best practice for dealing with timestamp
while using gRPC and is sending just the milliseconds as string or
uint64 without separating it into seconds an anti-pattern or bad practice.
--
You received this message because you are subscribed to the Google Groups
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/b4bf1e4d-bed0-4c36-a865-7a0293c39514n%40googlegroups.com.