# RFC 3339 (Space Separator)

Key: `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.

Page: <https://meridian.online/docs/projects/finetype/types/datetime/timestamp/rfc_3339>

Format: `%Y-%m-%d %H:%M:%S%z`

Alternative format: `%Y-%m-%d %H:%M:%SZ`

Samples: `2024-01-15 10:30:00+00:00`, `2019-12-31 23:59:59-05:00`, `2023-06-01 12:00:00+09:00`, `2024-03-15 10:30:00Z`

## Background

### Origin

RFC 3339, Date and Time on the Internet: Timestamps, was published in July 2002.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 was written by G. Klyne of Clearswift Corporation and C. Newman of Sun Microsystems.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 is a Standards Track document.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 defines a date and time format for use in Internet protocols that is a profile of the ISO 8601 standard.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 focuses on one common usage: timestamps for Internet protocol events.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 assumes that every time it expresses has a stated relationship, an offset, to Coordinated Universal Time.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 gives the date format 10/11/1996 as an example of one completely unsuitable for global interchange, because it is interpreted differently in different countries.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html)

RFC 3339 notes that ISO 8601 defines date and time separated by T.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 adds that applications may choose, for the sake of readability, to separate the full date and the full time with a space character.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) FineType's registry labels the space-separated form datetime.timestamp.rfc\_3339.[[2]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml) FineType's registry labels the T-separated form iso\_8601\_offset.[[2]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml)

RFC 3339 only allows hours from 00 to 23, although ISO 8601 permits the hour to be 24.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) RFC 3339 allows the seconds value 60 at the end of a month in which a leap second occurs.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html)

### Use

PostgreSQL accepts the T separator on input, but on output it uses a space rather than T.[[3]](https://www.postgresql.org/docs/current/datatype-datetime.html) PostgreSQL's documentation says the space is for readability and for consistency with RFC 3339 as well as some other database systems.[[3]](https://www.postgresql.org/docs/current/datatype-datetime.html)

Python's datetime.isoformat takes an optional one-character separator, which defaults to T, placed between the date and time portions of the result.[[4]](https://docs.python.org/3/library/datetime.html) Python's documentation shows isoformat(' ') producing 2002-12-25 00:00:00-06:39.[[4]](https://docs.python.org/3/library/datetime.html)

RFC 3339 says that applications generating the format should use upper case letters.[[1]](https://www.rfc-editor.org/rfc/rfc3339.html) DuckDB's %z format specifier reads a time offset from UTC in the form ±HH:MM, ±HHMM, or ±HH.[[5]](https://duckdb.org/docs/current/sql/functions/dateformat) When one column mixes T and space separators, normalise the separator first rather than parsing it as two formats. (Meridian's view) Load the column into a timestamp type that keeps the offset; dropping the offset turns an instant into a wall-clock reading that can no longer be compared across sources. (Meridian's view)

## Sources

1. [Date and Time on the Internet: Timestamps](https://www.rfc-editor.org/rfc/rfc3339.html) — standard
2. [finetype/labels/definitions\_datetime.yaml at main · meridian-online/finetype · GitHub](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml) — FineType
3. [PostgreSQL: Documentation: 18: 8.5. Date/Time Types](https://www.postgresql.org/docs/current/datatype-datetime.html) — documentation
4. [datetime — Basic date and time types](https://docs.python.org/3/library/datetime.html) — documentation
5. [Date Format Functions – DuckDB](https://duckdb.org/docs/current/sql/functions/dateformat) — documentation
