Skip to content

Commit 15439b7

Browse files
Include a conformance test for timestamps without colon in time zone.
PiperOrigin-RevId: 758822948
1 parent cd17890 commit 15439b7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

conformance/binary_json_conformance_suite.cc

+3
Original file line numberDiff line numberDiff line change
@@ -3258,6 +3258,9 @@ void BinaryAndJsonConformanceSuiteImpl<
32583258
R"({"optionalTimestamp": "0001-01-01T00:00:00z"})");
32593259
ExpectParseFailureForJson("TimestampJsonInputLowercaseT", REQUIRED,
32603260
R"({"optionalTimestamp": "0001-01-01t00:00:00Z"})");
3261+
ExpectParseFailureForJson(
3262+
"TimestampWithMissingColonInOffset", REQUIRED,
3263+
R"({"optionalTimestamp": "1970-01-01T08:00:01+0800"})");
32613264
ExpectSerializeFailureForJson("TimestampProtoInputTooSmall", REQUIRED,
32623265
"optional_timestamp: {seconds: -62135596801}");
32633266
ExpectSerializeFailureForJson("TimestampProtoInputTooLarge", REQUIRED,

conformance/failure_list_php.txt

+1
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ Required.*.ProtobufInput.ValidDataRepeated.FLOAT.UnpackedInput.JsonOutput
3232
Required.*.ProtobufInput.ValidDataScalar.FLOAT[2].JsonOutput
3333
Required.*.JsonInput.Int32FieldQuotedExponentialValue.* # Failed to parse input or produce output.
3434
Required.*.JsonInput.AnyWithNoType.*
35+
Required.*.JsonInput.TimestampWithMissingColonInOffset # Should have failed to parse, but didn't.

0 commit comments

Comments
 (0)