[GODRIVER-1514] Extended JSON $date incorrectly parses single-digit hours Created: 03/Mar/20 Updated: 12/Mar/20 Resolved: 12/Mar/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | JSON & ExtJSON |
| Affects Version/s: | 1.3.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Golden | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The driver incorrectly parses a single-digit hour for $date:
It should error because ISO 8601 (and RFC-3339) require a two-digit hour. This turns out to be a Go bug (#37616), but can be fixed by |
| Comments |
| Comment by Divjot Arora (Inactive) [ 12/Mar/20 ] |
|
Closing because this is really an issue in Go. The Go language team has said that they don't want to change the constant in the time package. We think it's best to keep parity with the language here and it makes our parser slightly too lenient, not too strict, so a user with well-formed data wouldn't run into this. |