# ISO Datetime, second precision (no timezone)

Key: `datetime.timestamp.iso_seconds`

ISO 8601-like format with second precision and no timezone indicator (e.g. 2013-06-04T01:02:03). Common in database exports and log files. The zoneless sibling of iso\_8601 (which requires a trailing Z).

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

Format: `%Y-%m-%dT%H:%M:%S`

Samples: `2013-06-04T01:02:03`, `2024-01-15T10:30:00`

## Background

### Origin

The first edition of ISO 8601, ISO 8601:1988, was published in June 1988.[[1]](https://en.wikipedia.org/wiki/ISO_8601) ISO 8601:1988 unified and replaced several older ISO standards, among them ISO 2014, ISO 2015, ISO 2711, ISO 3307 and ISO 4031.[[1]](https://en.wikipedia.org/wiki/ISO_8601)

ISO 8601 joins a date and a time of day into one value with the letter T.[[1]](https://en.wikipedia.org/wiki/ISO_8601) ISO 8601:2004 allowed the T to be left out by mutual agreement, but ISO 8601-1:2019 removed that provision.[[1]](https://en.wikipedia.org/wiki/ISO_8601) ISO 8601 says that if no UTC relation information is given with a time representation, the time is assumed to be in local time.[[1]](https://en.wikipedia.org/wiki/ISO_8601) ISO 8601 marks a time in UTC by adding a Z directly after the time, without a space.[[1]](https://en.wikipedia.org/wiki/ISO_8601)

FineType defines iso\_seconds as an ISO 8601-like format with second precision and no timezone indicator, such as 2013-06-04T01:02:03.[[2]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml) FineType's label file describes iso\_seconds as the zoneless sibling of iso\_8601, which requires a trailing Z.[[2]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml) FineType gives iso\_seconds the format string %Y-%m-%dT%H:%M:%S.[[2]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml)

### Use

Python's documentation calls a datetime naive when it does not contain enough information to locate itself unambiguously relative to other date and time objects.[[3]](https://docs.python.org/3/library/datetime.html) Java's LocalDateTime class is a date-time without a time-zone in the ISO-8601 calendar system, such as 2007-12-03T10:15:30.[[4]](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/LocalDateTime.html)

The HTML Standard defines a local date and time as one expressed without a time zone.[[5]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) The HTML Standard's normalised local date and time string separates the date from the time with a capital T.[[5]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) The HTML Standard's normalised local date and time string writes the time as the shortest possible string for the given time.[[5]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) Where one column mixes values with and without seconds, treat both shapes as the same field before you parse it. (Meridian's view)

RFC 3339 defines a date and time format for Internet protocols that is a profile of ISO 8601.[[6]](https://www.rfc-editor.org/rfc/rfc3339) RFC 3339's date-time grammar requires a time offset, either Z or a numeric offset, after the time.[[6]](https://www.rfc-editor.org/rfc/rfc3339) RFC 3339 deems the interoperability problems of unqualified local time unacceptable for the Internet, since interpreting one will fail in approximately 23/24 of the globe.[[6]](https://www.rfc-editor.org/rfc/rfc3339) Before handing a zoneless column to a parser built for RFC 3339, check what it does with a missing offset. (Meridian's view)

Before parsing, find out from the source's documentation which clock the values were read from: the server's local zone, the user's, or UTC with the Z dropped. (Meridian's view)

Parse into a timestamp type without a time zone, and attach a zone only once you know it, rather than letting a tool silently assume UTC or the machine's own zone. (Meridian's view)

## Sources

1. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) — secondary source
2. [definitions\_datetime.yaml](https://github.com/meridian-online/finetype/blob/main/labels/definitions_datetime.yaml) — FineType
3. [datetime — Basic date and time types](https://docs.python.org/3/library/datetime.html) — documentation
4. [LocalDateTime (Java SE 21 \& JDK 21)](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/LocalDateTime.html) — documentation
5. [HTML Standard](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) — standard
6. [Date and Time on the Internet: Timestamps](https://www.rfc-editor.org/rfc/rfc3339) — standard
