Alright so I just realized something when I generate new protobuff file using:
protoc my_file.proto --go_out=./
My .proto struct is somehow looks like:
message MyRequest {
google.protobuf.Timestamp my_time = 1;
}
If I use the protoc command somewhere around in 2021 I would get:
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
type MyRequest struct {
MyTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=my_time,json=myTime,proto3" json:"my_time,omitempty"`
}
But now I 'll get:
import timestamppb "google.golang.org/protobuf/types/known/timestamppb"
type MyRequest struct {
MyTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=my_time,json=myTime,proto3" json:"my_time,omitempty"`
}
The main problem is that the old struct presents MyTime in my timezone, but the new one converts it to UTC+0. Anyone know how to solve this problem?