{
  "id": "go/protobuf-timestamp-out-of-range",
  "signature": "proto: google.protobuf.Timestamp: seconds value out of range",
  "signature_zh": "proto: google.protobuf.Timestamp: 秒值超出范围",
  "regex": "proto:\\ google\\.protobuf\\.Timestamp:\\ seconds\\ value\\ out\\ of\\ range",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A google.protobuf.Timestamp was constructed with seconds outside the valid range [-62135596800, 253402300799], typically from a zero time.Time or a Unix timestamp in milliseconds.",
  "root_cause_type": "generic",
  "root_cause_zh": "构造的 google.protobuf.Timestamp 的秒值超出有效范围 [-62135596800, 253402300799]，通常来自零值 time.Time 或毫秒级的 Unix 时间戳。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Seconds must be in seconds; milliseconds overflow the valid range and produce an out-of-range error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "time.Time{}.Unix() is a large negative number that may fall outside the valid proto range depending on the year.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "Use timestamppb.New(t) which converts time.Time correctly, and validate t.IsZero() before conversion; for unset use a nil *timestamppb.Timestamp instead of zero.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Convert from milliseconds explicitly: ts := timestamppb.New(time.UnixMilli(ms)) so the seconds/nanos split is correct.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2025-04-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}