# udatetime **Repository Path**: danmu_admin/udatetime ## Basic Information - **Project Name**: udatetime - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-06 - **Last Updated**: 2023-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### Description Simple `datetime` module written in MicroPython for Pycom board
### Usage - Put `udatetime.py` file in `lib` folder. - Import it from `main.py` as shown in the example below.
### Example ```python from udatetime import udatetime # establish wireless connection # ... # ... datetime = udatetime() print(datetime.utc_seconds()) # print Unix epoch time in seconds # get utc time print(datetime.utcnow()) # utc time as string print(datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")) ```
### Dependencies - Pycom RTC module
### Limitation - Require internet connection
### Tested On - Pycom WiPy3.0 mounted on Pycom Expansion Board 3.0
### Logs 05/04/2021 - Add basic function to get Unix epoch time in seconds 07/05/2021 - Change datetime logic based on Pycom RTC module and NTP sync