On Sat, Feb 12, 2011 at 09:13, Marco@worldcorp <mmistr...@gmail.com> wrote:
> HI all
> is it possible to add a field of type timestamp , or date, to a
> protobuf message..
There is no 'default' way. The reason for that is that protocol
buffers are platform independent, and there is no real agreeable way
to represent timestamps on all platforms; there are seconds,
milliseconds and microseconds since 1970 around; yet other system
represent times in even higher resolution since a different epoch
Also, having protocol buffers handle timestamps might actually be too
generic; suppose you want to be sure to be interpretable in a
sufficient high resolution and protocol buffers choose to encode
microseconds since, say, 1970. Then this will encode in huge numbers (
= more wire bytes) - but OTOH, this is not really what is needed in
So - best is to have the application choose the time resolution that
makes sense depending on the application and deal with it in an
application dependent manner (e.g. I store seconds, milliseconds or
microseconds since 1970 GMT or Julian dates in protocol buffers to
transfer times in different contexts).
> i have quickly read the guide, and i saw no trace of timestamps or
> fields of type date.....
> could anyone assist?
> w/kindest regards
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to email@example.com.
> To unsubscribe from this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at