class documentation
Handles time-related functions.
| Method | __del__ |
Deinitialize the RTC and stop any running time task. |
| Method | __init__ |
Initialize the time manager. |
| Method | fetch |
Fetch the current date and time from NTP. |
| Method | set |
Set the current date and time. |
| Class Variable | __slots__ |
Undocumented |
| Property | date |
Return the current date only as string |
| Property | is |
Return whether the time is currently being fetched. |
| Property | is |
Return whether the time fetching process is currently running. |
| Property | is |
Return whether the time has been set. |
| Property | rtc |
Return the RTC object. |
| Property | time |
Return the current time only as string |
| Instance Variable | _current |
Undocumented |
| Instance Variable | _is |
Undocumented |
| Instance Variable | _lock |
Undocumented |
| Instance Variable | _requested |
Undocumented |
| Instance Variable | _rtc |
Undocumented |
| Instance Variable | _running |
Undocumented |
| Instance Variable | _thread |
Undocumented |
Initialize the time manager.
| Parameters | |
threadobject or None | Manager for running the NTP fetch in a thread. Defaults to None. |
Fetch the current date and time from NTP.
Originated from: https://github.com/micropython/micropython-lib/blob/master/micropython/net/ntptime/ntptime.py
| Parameters | |
offset:int | Timezone offset in hours to apply. Defaults to 0. |
| Returns | |
bool | True if the fetch was started or time was already set, False otherwise. |