{"record":{"id":"b1dd930ff7e0ebfc","repo":"influxdata/influxdb","slug":"cannot-parse-the-timestamp-0","errorCode":null,"errorMessage":"Cannot parse the timestamp: {0}","messagePattern":"Cannot parse the timestamp: (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_server/src/http.rs","lineNumber":382,"sourceCode":"    #[error(transparent)]\n    Influxdb3TypesHttp(#[from] influxdb3_types::http::Error),\n\n    #[error(\"Authorization error: {0}\")]\n    ResourceAuthorization(#[from] ResourceAuthorizationError),\n\n    #[error(\"Authentication error: {0}\")]\n    Authentication(#[from] AuthenticatorError),\n\n    #[error(\"The following Database does not exist: {0}\")]\n    MissingDb(String),\n\n    #[error(\"The following Database Table does not exist: {0}\")]\n    MissingTable(String),\n\n    #[error(\"Cannot parse the given human time: {0}\")]\n    ParsingHumanTime(#[source] humantime::DurationError),\n\n    #[error(\"Cannot parse the timestamp: {0}\")]\n    ParsingTimestamp(#[from] chrono::ParseError),\n\n    #[error(\"Timestamp is out of range\")]\n    TimestampOutOfRange,\n\n    #[error(\"Current node mode does not use the processing engine\")]\n    NoProcessingEngine,\n\n    #[error(\"invalid request: {0}\")]\n    InvalidRequest(String),\n\n    #[error(transparent)]\n    LegacyWriteParse(#[from] WriteParseError),\n}\n\n#[derive(Debug, Error)]\npub(crate) enum AuthenticationError {\n    #[error(\"the request was not authenticated\")]","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_server/src/http.rs#L364-L400","documentation":"This error is the `ParsingTimestamp(#[from] chrono::ParseError)` variant of the HTTP server's `Error` enum in influxdb3_server/src/http.rs, rendered as \"Cannot parse the timestamp: {0}\". It is thrown when an RFC3339/ISO-8601 timestamp supplied in an HTTP request cannot be parsed by `chrono::DateTime::parse_from_rfc3339` (converted via `#[from]`). The chrono parse error is embedded directly as the message payload.","triggerScenarios":"Supplying a `timestamp`, start/stop time, or other absolute-time HTTP parameter in a format chrono cannot parse as RFC3339 — e.g. missing timezone offset, unix epoch integer, or loose ISO-8601 variants.","commonSituations":"Sending a Unix epoch number (`1726800000`) where RFC3339 is required; omitting the `Z`/`+00:00` offset (`2024-09-19T12:00:00`); passing a datetime from a client library serialized in a non-RFC3339 format (e.g. Python `isoformat()` without tzinfo, JS `toISOString` is fine but `Date.toString()` is not).","solutions":["Format the timestamp as full RFC3339 with timezone offset, e.g. `2024-09-19T12:00:00Z`","If you have an epoch integer, convert it to RFC3339 before sending (or use the API's epoch-accepting parameter if available)","Inspect the embedded chrono::ParseError message to identify the malformed component","Ensure the timestamp includes fractional seconds in the supported `YYYY-MM-DDTHH:MM:SS[.fff]Z` form"],"exampleFix":"// before\n{\"start_timestamp\": \"2024-09-19T12:00:00\"} // missing offset\n// after\n{\"start_timestamp\": \"2024-09-19T12:00:00Z\"}","handlingStrategy":"validation","validationCode":"// normalize to RFC3339 before sending\nfunction toRfc3339(input) {\n  const d = typeof input === 'number' ? new Date(input * (input < 1e12 ? 1000 : 1)) : new Date(input);\n  const ts = d.toISOString(); // always RFC3339 with Z\n  if (isNaN(d.getTime())) throw new Error(`not a valid date: ${input}`);\n  return ts;\n}","typeGuard":"function isRfc3339(s) {\n  return typeof s === 'string' && /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$/.test(s);\n}","tryCatchPattern":"try {\n  await query(db, sql, { start_timestamp: ts });\n} catch (e) {\n  if (e.message.startsWith('Cannot parse the timestamp')) {\n    throw new Error(`Timestamp '${ts}' must be RFC3339 with offset, e.g. 2024-09-19T12:00:00Z`, { cause: e });\n  }\n  throw e;\n}","preventionTips":["Always serialize dates with toISOString() or equivalent RFC3339 serializers","Never pass raw epoch integers to timestamp parameters","Ensure timezone-aware datetimes (include Z or offset)","Unit-test your timestamp serialization against a strict RFC3339 regex"],"tags":["http","timestamp","chrono","influxdb3","time-parsing"],"backgroundTag":"invalid-date-format","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}