Update README.md

This commit is contained in:
Anthony dela Paz 2021-12-21 17:49:42 +08:00 committed by GitHub
parent e697db1f0e
commit 2e5d6ed4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,4 +51,4 @@ void loop() {
## Function documentation
`getEpochTime` returns the Unix epoch, which are the seconds elapsed since 00:00:00 UTC on 1 January 1970 (leap seconds are ignored, every day is treated as having 86400 seconds). **Attention**: If you have set a time offset this time offset will be added to your epoch timestamp.
`setEpochTime` sets the Unix epoch internally maintained by the NTPClient library. The function parameter is the local time converted to number of seconds since 00:00:00 on 1 January 1970 (local time). Useful when you have a hardware RTC (eg., DS3231) running on local time but uses the NTPClient library for timekeeping.
`setEpochTime` sets the Unix epoch internally maintained by the NTPClient library. The function parameter is the local time converted to number of seconds since 00:00:00 on 1 January 1970 (local time). Useful when you have a hardware RTC (eg., DS3231) running on local time but uses the NTPClient library for timekeeping. At start-up, you set the NTPClient time offset and then set the internal NTPClient epoch timestamp using the time you fetch from the hardware RTC. The `setEpochTime` uses the time offset that you specified to compute the epoch timestamp.