{"record":{"id":"4611b34e7055e05b","repo":"gastownhall/beads","slug":"unrecognized-timestamp-format-s","errorCode":null,"errorMessage":"unrecognized timestamp format: %s","messagePattern":"unrecognized timestamp format: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/jira/refs.go","lineNumber":61,"sourceCode":"\t}\n\n\t// Try common formats\n\tformats := []string{\n\t\t\"2006-01-02T15:04:05.000-0700\",\n\t\t\"2006-01-02T15:04:05.000Z\",\n\t\t\"2006-01-02T15:04:05-0700\",\n\t\t\"2006-01-02T15:04:05Z\",\n\t\ttime.RFC3339,\n\t\ttime.RFC3339Nano,\n\t}\n\n\tfor _, format := range formats {\n\t\tif t, err := time.Parse(format, ts); err == nil {\n\t\t\treturn t, nil\n\t\t}\n\t}\n\n\treturn time.Time{}, fmt.Errorf(\"unrecognized timestamp format: %s\", ts)\n}\n","sourceCodeStart":43,"sourceCodeEnd":63,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/jira/refs.go#L43-L63","documentation":"ParseTimestamp tried every known Jira timestamp layout (ISO 8601 variants with millisecond offsets and 'Z') and none matched, so it returns the offending string verbatim. Jira Cloud and Server emit slightly different offset formats, and malformed or human-entered values will not parse.","triggerScenarios":"ParseTimestamp receives a non-empty string that matches none of the configured layouts — e.g. missing milliseconds ('2024-01-15T10:30:00+0000'), seconds-precision offset formats, a locale date string, or garbage.","commonSituations":"Jira Server/DC emitting '+00:00' colon-style offsets; custom datetime fields configured without time or with odd formats; values truncated or edited by an intermediate integration; localization producing non-ISO dates; a new Jira API version changing the format.","solutions":["Print the offending ts value from the message and compare against expected ISO 8601 layouts.","Add the observed layout to the formats slice in refs.go (e.g. \"2006-01-02T15:04:05-07:00\" for colon offsets).","Pre-normalize the string (replace '+00:00' with '+0000', ensure milliseconds) before parsing.","If the field is a date-only custom field, use a date layout (\"2006-01-02\") instead.","Upgrade/downgrade alignment: check whether your Jira Server/DC version emits a nonstandard format and pin handling accordingly."],"exampleFix":"// before: only formats in refs.go are tried, '+00:00' offsets fail\nformats := []string{\"2006-01-02T15:04:05.000-0700\", \"2006-01-02T15:04:05.000Z\"}\n// after: add colon-offset layout\nformats := append(formats, \"2006-01-02T15:04:05-07:00\", \"2006-01-02T15:04:05.000-07:00\")","handlingStrategy":"fallback","validationCode":"func looksLikeJiraTimestamp(ts string) bool {\n    if ts == \"\" { return false }\n    for _, layout := range []string{\"2006-01-02T15:04:05.000-0700\", \"2006-01-02T15:04:05.000Z\", \"2006-01-02T15:04:05-07:00\"} {\n        if _, err := time.Parse(layout, ts); err == nil { return true }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"t, err := jira.ParseTimestamp(ts)\nif err != nil {\n    if strings.Contains(err.Error(), \"unrecognized timestamp format\") {\n        // fallback: try RFC3339, then date-only\n        if t2, e2 := time.Parse(time.RFC3339, ts); e2 == nil { return t2, nil }\n        if t3, e3 := time.Parse(\"2006-01-02\", ts); e3 == nil { return t3, nil }\n    }\n    return err\n}","preventionTips":["Log the raw ts from the error message to learn your instance's actual format.","Add Jira Server/DC colon-offset layouts if you run non-Cloud Jira.","Normalize timestamps (millisecond padding, offset style) at the API boundary.","Date-only custom fields need a date layout, not datetime.","Pin/verify format expectations after Jira API version upgrades."],"tags":["jira","timestamp","parsing","date-format"],"backgroundTag":"timestamp-parse-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}