#Protofub timestamp showing up as seconds only in some places

2 messages · Page 1 of 1 (latest)

stone dome
#

I'm writing a gRPC API and using protobuf so I used the timestamppb for timestamps. in most places it works just fine, the output even from grpc-gateway is normal rfc3339 which is what I want.
However, when writing the frontend which is just html templates with the returned struct passed as an argument, the date shows up as seconds:1613952000 which is not what I want.

What's at fault here and how do I solve it? I'm attaching a screenshot to demonstrate the issue

#

I know I could switch to using grpc-gateway output as a workaround but I'm mostly interested in the more proper solution to understand what's wrong and fix it