gastownhall/beads · error
unrecognized timestamp format: %s
Error message
unrecognized timestamp format: %s
What it means
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.
Source
Thrown at internal/jira/refs.go:61
}
// Try common formats
formats := []string{
"2006-01-02T15:04:05.000-0700",
"2006-01-02T15:04:05.000Z",
"2006-01-02T15:04:05-0700",
"2006-01-02T15:04:05Z",
time.RFC3339,
time.RFC3339Nano,
}
for _, format := range formats {
if t, err := time.Parse(format, ts); err == nil {
return t, nil
}
}
return time.Time{}, fmt.Errorf("unrecognized timestamp format: %s", ts)
}
View on GitHub (pinned to 71377f2769)
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.
Example fix
// before: only formats in refs.go are tried, '+00:00' offsets fail
formats := []string{"2006-01-02T15:04:05.000-0700", "2006-01-02T15:04:05.000Z"}
// after: add colon-offset layout
formats := append(formats, "2006-01-02T15:04:05-07:00", "2006-01-02T15:04:05.000-07:00") Defensive patterns
Strategy: fallback
Validate before calling
func looksLikeJiraTimestamp(ts string) bool {
if ts == "" { return false }
for _, layout := range []string{"2006-01-02T15:04:05.000-0700", "2006-01-02T15:04:05.000Z", "2006-01-02T15:04:05-07:00"} {
if _, err := time.Parse(layout, ts); err == nil { return true }
}
return false
} Try / catch
t, err := jira.ParseTimestamp(ts)
if err != nil {
if strings.Contains(err.Error(), "unrecognized timestamp format") {
// fallback: try RFC3339, then date-only
if t2, e2 := time.Parse(time.RFC3339, ts); e2 == nil { return t2, nil }
if t3, e3 := time.Parse("2006-01-02", ts); e3 == nil { return t3, nil }
}
return err
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- empty timestamp
- parse Jira timestamp: %w
- parse %s: %w
- dolt version output is unparseable
- parsing batch input: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/4611b34e7055e05b.
Report an issue: GitHub.