Implement a simpler unversioned.Time serialization
Time is the number of seconds since the unix epoch and is consistent with our JSON fields.
This commit is contained in:
@@ -28,8 +28,9 @@ import (
|
||||
// of the factory methods that the time package offers.
|
||||
//
|
||||
// +protobuf.options.marshal=false
|
||||
// +protobuf.as=Timestamp
|
||||
type Time struct {
|
||||
time.Time `protobuf:"Timestamp,1,req,name=time"`
|
||||
time.Time `protobuf:"-"`
|
||||
}
|
||||
|
||||
// NewTime returns a wrapped instance of the provided time
|
||||
|
||||
Reference in New Issue
Block a user