Skip to content

Commit

Permalink
Docs: Give additional example of exact time strings
Browse files Browse the repository at this point in the history
We don't want to imply that Z is the only way to get an exact time.
  • Loading branch information
ptomato committed Jan 15, 2025
1 parent e51f3c0 commit c3adf35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/timezone.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Every wall-clock time is defined using a **UTC Offset**: the amount of exact tim
For example, on January 19, 2020 in California, the UTC Offset (or "offset" for short) was `-08:00` which means that wall-clock time in San Francisco was 8 hours behind UTC, so 10:00AM locally on that day was 18:00 UTC.
However the same calendar date and wall-clock time India would have an offset of `+05:30`: 5½ hours later than UTC.

[RFC 9557](https://datatracker.ietf.org/doc/html/rfc9557), [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), and [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) define standard representations for exact times as a date and time value, e.g. `2020-09-06T17:35:24.485Z`. The `Z` suffix indicates that this is an exact UTC time.
[RFC 9557](https://datatracker.ietf.org/doc/html/rfc9557), [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), and [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) define standard representations for exact times as a date and time value, e.g. `2020-09-06T17:35:24.485Z` and `2020-09-06T17:35:24.485-07:00`.
The presence of a `Z` suffix or UTC offset (`-07:00`) indicates that this is an exact time.

Temporal has two types that store exact time: `Temporal.Instant` (which only stores exact time and no other information) and `Temporal.ZonedDateTime` which stores exact time, a time zone, and a calendar system

Expand Down

0 comments on commit c3adf35

Please sign in to comment.