lib/google/cloud/kms/v1/doc/google/protobuf/timestamp.rb in google-cloud-kms-0.2.1 vs lib/google/cloud/kms/v1/doc/google/protobuf/timestamp.rb in google-cloud-kms-0.2.2
- old
+ new
@@ -10,10 +10,11 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
module Google
module Protobuf
# 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
@@ -70,27 +71,29 @@
#
# = JSON Mapping
#
# In JSON format, the Timestamp type is encoded as a string in the
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
- # format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
- # where {year} is always expressed using four digits while {month}, {day},
- # {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+ # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
+ # where \\{year} is always expressed using four digits while \\{month}, \\{day},
+ # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
- # is required, though only UTC (as indicated by "Z") is presently supported.
+ # is required. A proto3 JSON serializer should always use UTC (as indicated by
+ # "Z") when printing the Timestamp type and a proto3 JSON parser should be
+ # able to accept both UTC and other timezones (as indicated by an offset).
#
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
# 01:30 UTC on January 15, 2017.
#
# In JavaScript, one can convert a Date object to this format using the
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
# method. In Python, a standard +datetime.datetime+ object can be converted
# to this format using [+strftime+](https://docs.python.org/2/library/time.html#time.strftime)
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
# can use the Joda Time's [+ISODateTimeFormat.dateTime()+](
- # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
- # to obtain a formatter capable of generating timestamps in this format.
+ # http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
+ # ) to obtain a formatter capable of generating timestamps in this format.
# @!attribute [rw] seconds
# @return [Integer]
# Represents seconds of UTC time since Unix epoch
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
# 9999-12-31T23:59:59Z inclusive.
\ No newline at end of file