Here is a model blog.
# id :bigint(8)
# created_at :datetime not null
# updated_at :datetime not null
class Blog < ApplicationRecord
end
I would like to convert model's created_at and updated_at to google Protobuf TimeStamp
blog = Blog.first
blog.created_at
How to convert DateTime to google Protobuf TimeStamp when forming a protobuf message?