What version of protobuf and what language are you using?
Version: 3.10
Language: PHP
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
php 7.2.24
What did you do?
Steps to reproduce the behavior:
- Perform
mergeFromJsonString on an RFC3339 compliant timestamp with a non zero minute time offset "2020-11-15T11:10:00+02:30". (Note: this works perfectly for "2020-11-15T11:10:00+02:00")
What did you expect to see
The json read correctly into \Google\Protobuf\Timestamp; as protobuf says that Timestamp (as a WKT) uses RFC3339.
What did you see instead?
Segmentation fault (core dumped)
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
If I followed along the code correctly, here the minutes are hardcoded as "00" effectively disallowing any timestamp with non-"00" offset in minutes.
https://github.com/protocolbuffers/protobuf/blob/master/php/ext/google/protobuf/php-upb.c#L6931
If I understood RFC3339 correctly, there should be no such restriction.
I could not find any existing open or closed issue which addressed this under php label, hence, I created one.
What version of protobuf and what language are you using?
Version: 3.10
Language: PHP
What operating system (Linux, Windows, ...) and version?
Linux
What runtime / compiler are you using (e.g., python version or gcc version)
php 7.2.24
What did you do?
Steps to reproduce the behavior:
mergeFromJsonStringon anRFC3339compliant timestamp with a non zero minute time offset"2020-11-15T11:10:00+02:30". (Note: this works perfectly for"2020-11-15T11:10:00+02:00")What did you expect to see
The
jsonread correctly into\Google\Protobuf\Timestamp; asprotobufsays thatTimestamp(as a WKT) usesRFC3339.What did you see instead?
Segmentation fault (core dumped)
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
If I followed along the code correctly, here the minutes are hardcoded as "00" effectively disallowing any timestamp with non-"00" offset in minutes.
https://github.com/protocolbuffers/protobuf/blob/master/php/ext/google/protobuf/php-upb.c#L6931
If I understood RFC3339 correctly, there should be no such restriction.
I could not find any existing open or closed issue which addressed this under php label, hence, I created one.