aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD1
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs4
-rw-r--r--objectivec/google/protobuf/Timestamp.pbobjc.h4
-rw-r--r--src/google/protobuf/stubs/io_win32.cc9
-rw-r--r--src/google/protobuf/timestamp.proto4
5 files changed, 15 insertions, 7 deletions
diff --git a/BUILD b/BUILD
index bee4fab7..547181e8 100644
--- a/BUILD
+++ b/BUILD
@@ -735,6 +735,7 @@ py_proto_library(
":python_srcs",
"//external:six",
],
+ py_extra_srcs = glob(["python/**/__init__.py"]),
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
)
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
index 036be63f..332d74b6 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Timestamp.cs
@@ -101,7 +101,9 @@ namespace Google.Protobuf.WellKnownTypes {
/// {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.
diff --git a/objectivec/google/protobuf/Timestamp.pbobjc.h b/objectivec/google/protobuf/Timestamp.pbobjc.h
index 998bc15d..7e65b15b 100644
--- a/objectivec/google/protobuf/Timestamp.pbobjc.h
+++ b/objectivec/google/protobuf/Timestamp.pbobjc.h
@@ -115,7 +115,9 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
* {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.
diff --git a/src/google/protobuf/stubs/io_win32.cc b/src/google/protobuf/stubs/io_win32.cc
index fa2cb8b1..2b8a8a22 100644
--- a/src/google/protobuf/stubs/io_win32.cc
+++ b/src/google/protobuf/stubs/io_win32.cc
@@ -155,12 +155,13 @@ string normalize(string path) {
static const string dot(".");
static const string dotdot("..");
+ const char *p = path.c_str();
std::vector<string> segments;
int segment_start = -1;
// Find the path segments in `path` (separated by "/").
for (int i = 0;; ++i) {
- if (!is_separator(path[i]) && path[i] != '\0') {
+ if (!is_separator(p[i]) && p[i] != '\0') {
// The current character does not end a segment, so start one unless it's
// already started.
if (segment_start < 0) {
@@ -169,7 +170,7 @@ string normalize(string path) {
} else if (segment_start >= 0 && i > segment_start) {
// The current character is "/" or "\0", so this ends a segment.
// Add that to `segments` if there's anything to add; handle "." and "..".
- string segment(path, segment_start, i - segment_start);
+ string segment(p, segment_start, i - segment_start);
segment_start = -1;
if (segment == dotdot) {
if (!segments.empty() &&
@@ -180,7 +181,7 @@ string normalize(string path) {
segments.push_back(segment);
}
}
- if (path[i] == '\0') {
+ if (p[i] == '\0') {
break;
}
}
@@ -203,7 +204,7 @@ string normalize(string path) {
result << segments[i];
}
// Preserve trailing separator if the input contained it.
- if (!path.empty() && is_separator(path[path.size() - 1])) {
+ if (!path.empty() && is_separator(p[path.size() - 1])) {
result << '\\';
}
return result.str();
diff --git a/src/google/protobuf/timestamp.proto b/src/google/protobuf/timestamp.proto
index 6074b1f7..eafb3fa0 100644
--- a/src/google/protobuf/timestamp.proto
+++ b/src/google/protobuf/timestamp.proto
@@ -103,7 +103,9 @@ option objc_class_prefix = "GPB";
// {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.