Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,15 @@ time with a space (as permitted by RFC 3339 section 5.6).
odt4 = 1979-05-27 07:32:00Z
```

One exception to RFC 3339 is permitted: seconds may be omitted if the instant
occurs at a zero-second mark. In such a case, the offset immediately follows
the minutes.

```toml
odt5 = 1979-05-27 07:32Z
odt6 = 1979-05-27 07:32-07:00
```

The precision of fractional seconds is implementation specific, but at least
millisecond precision is expected. If the value contains greater precision than
the implementation can support, the additional precision must be truncated, not
Expand All @@ -581,6 +590,13 @@ ldt1 = 1979-05-27T07:32:00
ldt2 = 1979-05-27T00:32:00.999999
```

Seconds may be omitted if the local instant is at a zero-second mark. In such a
case, the colon and digits following the minutes are removed.

```toml
ldt3 = 1979-05-27T07:32
```

The precision of fractional seconds is implementation specific, but at least
millisecond precision is expected. If the value contains greater precision than
the implementation can support, the additional precision must be truncated, not
Expand Down Expand Up @@ -610,6 +626,13 @@ lt1 = 07:32:00
lt2 = 00:32:00.999999
```

Seconds may be omitted if the local time is at a zero-second mark. In such a
case, the colon and digits following the minutes are removed.

```toml
lt3 = 07:32
```

The precision of fractional seconds is implementation specific, but at least
millisecond precision is expected. If the value contains greater precision than
the implementation can support, the additional precision must be truncated, not
Expand Down
2 changes: 1 addition & 1 deletion toml.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ time-secfrac = "." 1*DIGIT
time-numoffset = ( "+" / "-" ) time-hour ":" time-minute
time-offset = "Z" / time-numoffset

partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ]
partial-time = time-hour ":" time-minute [ ":" time-second [ time-secfrac ] ]
full-date = date-fullyear "-" date-month "-" date-mday
full-time = partial-time time-offset

Expand Down