Skip to content

RFC 3339 (Space Separator)

Type Registry

RFC 3339 (Space Separator)

datetime.timestamp.rfc_3339

Internet datetime format, a profile of ISO 8601 that allows a space separator between date and time (RFC 3339 §5.6). Used in Atom feeds, JSON APIs, and modern web services. Distinguished from iso_8601_offset by the space separator: RFC 3339 uses space, ISO 8601 requires T. Disambiguation: Tier 2 timestamp model detects T vs space.

Domain datetimetimestamp
Casts to TIMESTAMPTZ
Scope Universal

Try it

CLI
$ finetype infer -i "2024-01-15 10:30:00+00:00"
→ datetime.timestamp.rfc_3339

DuckDB

Detect
SELECT finetype('2024-01-15 10:30:00+00:00');
-- → 'datetime.timestamp.rfc_3339'
Cast expression
strptime({col}, '%Y-%m-%d %H:%M:%S%:z')
Format: %Y-%m-%d %H:%M:%S%:z
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS TIMESTAMPTZ) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.timestamp.rfc_3339';

JSON Schema

finetype schema datetime.timestamp.rfc_3339
{
  "$id": "https://noon.sh/schemas/datetime.timestamp.rfc_3339",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Internet datetime format, a profile of ISO 8601 that allows a space separator between date and time (RFC 3339 §5.6). Used in Atom feeds, JSON APIs, and modern web services. Distinguished from iso_8601_offset by the space separator: RFC 3339 uses space, ISO 8601 requires T. Disambiguation: Tier 2 timestamp model detects T vs space.",
  "examples": [
    "2024-01-15 10: 30: 00+00: 00",
    "2019-12-31 23: 59: 59-05: 00",
    "2023-06-01 12: 00: 00+09: 00"
  ],
  "pattern": "^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}[+-]\\d{2}:\\d{2}$",
  "title": "RFC 3339 (Space Separator)",
  "type": "string"
}

Examples

2024-01-15 10:30:00+00:002019-12-31 23:59:59-05:002023-06-01 12:00:00+09:00

Types in datetime