1
votes

I'm using Python protobuf library to read message sent by a .Net application that use protobuf-net. The .Net app sends DateTime. The datetime encoding does not seems trivial and I don't know how to parse it. Anybody know the formatting of the DateTime in the protobuf-net library?

1

1 Answers

1
votes

If I was doing it all over again, I would have done it much simpler - I might still add an option to make it simpler! but:

bcl.proto

Basically, it chooses the correct scale to guarantee the value. So you just need to do some multiplication of the .value based on the .scale.