{"record":{"id":"477ccae93fa38d70","repo":"github/github-mcp-server","slug":"invalid-iso-8601-timestamp-s-supported-formats","errorCode":null,"errorMessage":"invalid ISO 8601 timestamp: %s (supported formats: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DD)","messagePattern":"invalid ISO 8601 timestamp: (.+?) \\(supported formats: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DD\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/issues.go","lineNumber":3180,"sourceCode":"func parseISOTimestamp(timestamp string) (time.Time, error) {\n\tif timestamp == \"\" {\n\t\treturn time.Time{}, fmt.Errorf(\"empty timestamp\")\n\t}\n\n\t// Try RFC3339 format (standard ISO 8601 with time)\n\tt, err := time.Parse(time.RFC3339, timestamp)\n\tif err == nil {\n\t\treturn t, nil\n\t}\n\n\t// Try simple date format (YYYY-MM-DD)\n\tt, err = time.Parse(\"2006-01-02\", timestamp)\n\tif err == nil {\n\t\treturn t, nil\n\t}\n\n\t// Return error with supported formats\n\treturn time.Time{}, fmt.Errorf(\"invalid ISO 8601 timestamp: %s (supported formats: YYYY-MM-DDThh:mm:ssZ or YYYY-MM-DD)\", timestamp)\n}\n","sourceCodeStart":3162,"sourceCodeEnd":3182,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/issues.go#L3162-L3182","documentation":"parseISOTimestamp accepts exactly two layouts — RFC 3339 (YYYY-MM-DDThh:mm:ssZ, e.g. 2023-01-15T14:30:00Z) and plain dates (YYYY-MM-DD) — and rejects everything else with this message echoing the bad input. Note RFC 3339 requires a timezone offset; a bare 'T' string without one fails.","triggerScenarios":"Passing \"2023-01-15 14:30:00\" (space instead of T), \"2023-01-15T14:30:00\" (missing Z/offset), \"01/15/2023\", or an RFC3339 with fractional seconds and no zone.","commonSituations":"DB or log-derived timestamps in non-RFC3339 form; missing timezone info; dates built by string concatenation; RFC 3339 allows lowercase 't'/'z' but Go's time.RFC3339 parsing does not, so \"2023-01-15t14:30:00z\" also fails.","solutions":["Format timestamps as YYYY-MM-DDThh:mm:ssZ (with explicit UTC 'Z' or numeric offset) or plain YYYY-MM-DD","Convert from your local representation with time.Format(time.RFC3339) before sending","For date-only semantics, send just YYYY-MM-DD"],"exampleFix":"// before\n{\"since\":\"2023-01-15 14:30:00\"}\n// after\n{\"since\":\"2023-01-15T14:30:00Z\"}","handlingStrategy":"validation","validationCode":"func normalizeTimestamp(s string) (string, error) {\n\tfor _, layout := range []string{time.RFC3339, \"2006-01-02\"} {\n\t\tif t, err := time.Parse(layout, s); err == nil {\n\t\t\treturn t.Format(layout), nil\n\t\t}\n\t}\n\t// last resort: try common local formats, then emit RFC3339\n\tfor _, layout := range []string{\"2006-01-02 15:04:05\", \"01/02/2006\"} {\n\t\tif t, err := time.Parse(layout, s); err == nil {\n\t\t\treturn t.Format(time.RFC3339), nil\n\t\t}\n\t}\n\treturn \"\", fmt.Errorf(\"unrecognized timestamp %q\", s)\n}","typeGuard":"func isISOTimestamp(s string) bool {\n\tif _, err := time.Parse(time.RFC3339, s); err == nil {\n\t\treturn true\n\t}\n\t_, err := time.Parse(\"2006-01-02\", s)\n\treturn err == nil\n}","tryCatchPattern":null,"preventionTips":["Always emit time.Format(time.RFC3339) output — never hand-built strings","Include an explicit timezone (Z or +hh:mm); Go rejects zoneless 'T' timestamps"],"tags":["validation","timestamp","iso8601","issues"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}