Skip to content

Commit 79c91e0

Browse files
committed
README.md: fix MarkDown; add info about leap seconds
1 parent da648ce commit 79c91e0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ epoch of 1970-01-01 is provided through conversion functions of the `time_t`
5353
type. Only the 64-bit version of the `time_t` type is supported to avoid the
5454
[Year 2038 Problem](https://en.wikipedia.org/wiki/Year_2038_problem).
5555

56+
The library does *not* support [leap
57+
seconds](https://en.wikipedia.org/wiki/Leap_second) and ignores them. Instead it
58+
uses [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (aka POSIX time) where
59+
the *POSIX second* is variable in duration compared to the [SI
60+
second](https://en.wikipedia.org/wiki/Second). During a leap second, a POSIX
61+
second is conceptually equal to 2 SI seconds, and the POSIX clock changes from
62+
`23:59:58` to `23:59:59`, then is held for 2 seconds before rolling over to
63+
`00:00:00`. Most real-time clock (RTC) chips do not support leap seconds either,
64+
so the final `23:59:59` second will be held for only one second instead of two,
65+
so a clock using AceTime with such an RTC chip will be off by one second after a
66+
leap second compared to the atomic UTC clock.
67+
5668
The companion library [AceTimeClock](https://github.com/bxparks/AceTimeClock)
5769
provides Clock classes to retrieve the time from more accurate sources, such as
5870
an [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol) server, or a
@@ -81,7 +93,7 @@ This library can be an alternative to the Arduino Time
8193
(https://github.com/JChristensen/Timezone) libraries.
8294

8395
**Major Changes in v4.0**: Rename `LocalDate` to `PlainDate`; `LocalTime` to
84-
`PlainTime`; `LocalDateTime` to `PlainDateTime. Backwards compatible macros are
96+
`PlainTime`; `LocalDateTime` to `PlainDateTime`. Backwards compatible macros are
8597
provided, so most existing programs should still compile. See [Migrating to
8698
v4.0](MIGRATING.md#MigratingToVersion400) for more details. Add `zonedb2025` and
8799
`zonedbx2025` databases which contain DST transitions for year >= 2025, which

0 commit comments

Comments
 (0)