Ruby version Timestamp.from_time
feels like there should be a class method
#8424
Labels
Timestamp.from_time
feels like there should be a class method
#8424
What language does this apply to?
Generated Ruby code
Describe the problem you are trying to solve.
Working with timestamps is somewhat awkward. To create a protobuf timestamp from Ruby time objects, you have to do the following:
Describe the solution you'd like
It seems like it would be easier if the Timestamp class just defined a class method as well as an instance method. Something like:
This would allow developers to create timestamp objects in a slightly more natural syntax:
The text was updated successfully, but these errors were encountered: