From 5f2fcc3f6c5eba06ed667103820244a2f6c06043 Mon Sep 17 00:00:00 2001 From: Michael Shields Date: Tue, 18 Sep 2018 19:32:50 -0700 Subject: Update comments to discuss leap smearing in detail. Fixes #1890. --- src/google/protobuf/timestamp.proto | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/google/protobuf/timestamp.proto b/src/google/protobuf/timestamp.proto index 3faa3ab7..05d988a4 100644 --- a/src/google/protobuf/timestamp.proto +++ b/src/google/protobuf/timestamp.proto @@ -40,17 +40,19 @@ option java_outer_classname = "TimestampProto"; option java_multiple_files = true; option objc_class_prefix = "GPB"; -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// A Timestamp represents a point in time independent of any time zone or local +// calendar, encoded as a count of seconds and fractions of seconds at +// nanosecond resolution. The count is relative to an epoch at UTC midnight on +// January 1, 1970, in the proleptic Gregorian calendar which extends the +// Gregorian calendar backwards to year one. +// +// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap +// second table is needed for interpretation, using a [24-hour linear +// smear](https://developers.google.com/time/smear). +// +// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By +// restricting to that range, we ensure that we can convert to and from [RFC +// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. // // # Examples // -- cgit v1.2.3 From 10360e342ff842bb2e828b8c038710d6f9dc6d4f Mon Sep 17 00:00:00 2001 From: Michael Shields Date: Wed, 19 Sep 2018 12:54:57 -0700 Subject: Regenerate C# and Objective-C. --- .../Google.Protobuf/WellKnownTypes/Timestamp.cs | 24 ++++++++++++---------- objectivec/google/protobuf/Timestamp.pbobjc.h | 24 ++++++++++++---------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs index d1ab0f89..984e226f 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs @@ -41,17 +41,19 @@ namespace Google.Protobuf.WellKnownTypes { } #region Messages /// - /// A Timestamp represents a point in time independent of any time zone - /// or calendar, represented as seconds and fractions of seconds at - /// nanosecond resolution in UTC Epoch time. It is encoded using the - /// Proleptic Gregorian Calendar which extends the Gregorian calendar - /// backwards to year one. It is encoded assuming all minutes are 60 - /// seconds long, i.e. leap seconds are "smeared" so that no leap second - /// table is needed for interpretation. Range is from - /// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - /// By restricting to that range, we ensure that we can convert to - /// and from RFC 3339 date strings. - /// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + /// A Timestamp represents a point in time independent of any time zone or local + /// calendar, encoded as a count of seconds and fractions of seconds at + /// nanosecond resolution. The count is relative to an epoch at UTC midnight on + /// January 1, 1970, in the proleptic Gregorian calendar which extends the + /// Gregorian calendar backwards to year one. + /// + /// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + /// second table is needed for interpretation, using a [24-hour linear + /// smear](https://developers.google.com/time/smear). + /// + /// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + /// restricting to that range, we ensure that we can convert to and from [RFC + /// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. /// /// # Examples /// diff --git a/objectivec/google/protobuf/Timestamp.pbobjc.h b/objectivec/google/protobuf/Timestamp.pbobjc.h index dc4cef75..19ca6862 100644 --- a/objectivec/google/protobuf/Timestamp.pbobjc.h +++ b/objectivec/google/protobuf/Timestamp.pbobjc.h @@ -56,17 +56,19 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) { }; /** - * A Timestamp represents a point in time independent of any time zone - * or calendar, represented as seconds and fractions of seconds at - * nanosecond resolution in UTC Epoch time. It is encoded using the - * Proleptic Gregorian Calendar which extends the Gregorian calendar - * backwards to year one. It is encoded assuming all minutes are 60 - * seconds long, i.e. leap seconds are "smeared" so that no leap second - * table is needed for interpretation. Range is from - * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. - * By restricting to that range, we ensure that we can convert to - * and from RFC 3339 date strings. - * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. * * # Examples * -- cgit v1.2.3