Index: third_party/protobuf/src/google/protobuf/timestamp.proto |
diff --git a/third_party/protobuf/src/google/protobuf/timestamp.proto b/third_party/protobuf/src/google/protobuf/timestamp.proto |
index 67e2eba4f8536174f9bb95a327eea45ed25027fe..7992a85886fb0cf91fefabdd9bfa9acb07bd09bb 100644 |
--- a/third_party/protobuf/src/google/protobuf/timestamp.proto |
+++ b/third_party/protobuf/src/google/protobuf/timestamp.proto |
@@ -38,6 +38,7 @@ option go_package = "github.com/golang/protobuf/ptypes/timestamp"; |
option java_package = "com.google.protobuf"; |
option java_outer_classname = "TimestampProto"; |
option java_multiple_files = true; |
+option java_generate_equals_and_hash = true; |
option objc_class_prefix = "GPB"; |
// A Timestamp represents a point in time independent of any time zone |
@@ -89,14 +90,16 @@ option objc_class_prefix = "GPB"; |
// |
// Example 5: Compute Timestamp from current time in Python. |
// |
-// timestamp = Timestamp() |
-// timestamp.GetCurrentTime() |
+// now = time.time() |
+// seconds = int(now) |
+// nanos = int((now - seconds) * 10**9) |
+// timestamp = Timestamp(seconds=seconds, nanos=nanos) |
// |
// |
message Timestamp { |
// Represents seconds of UTC time since Unix epoch |
- // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to |
+ // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to |
// 9999-12-31T23:59:59Z inclusive. |
int64 seconds = 1; |