What is .proto message for datetime in protobuf-net

I am trying to write some code that will generate exact .proto files from a model like protobuf-net (V2), so I can write a python client capable of deserializing the generated protobuf-net messages.

I am a bit stuck that messages should look like datetime, can anyone shed some light on this?

Thanks <3

+6
source share
1 answer

The protobuf spec kernel does not have a built-in mechanism for processing dates / times.

If you work between platforms, then, frankly, I suggest exposing it in a simpler way, for example long (unix time or the like). protobuf-net uses a slightly more detailed layout to take advantage of the fact that many date and time values ​​are pure dates, etc. There was BCL.proto on the project website, but I can’t find it right now ... It's weird (I will research). However: if the option is available: simply expose the data in a simpler way.

+8
source

Source: https://habr.com/ru/post/918065/


All Articles