Skip to content

dvsu/udatetime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

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


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

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages