Skip to content
#

micropython

Here are 1,027 public repositories matching this topic...

circuitpython
powersoft
powersoft commented Sep 1, 2020

I wont to convert a unixtimestamp to localtime in circuit python.
This is the simple code:

unix_correction = 946684800 # correct to 01-01-2000
timezone = 7200
t=1598887049

def convertUnixTime(t,timezone):
dummy=time.localtime(t-unix_correction+timezone)
return "%4d-%02d-%02d %02d:%02d" % (dummy[0],dummy[1],dummy[2],dummy[3],dummy[4])

Running it I get the error message:

"time

MicroWebSrv2

The last Micro Web Server for IoTs (MicroPython) or large servers (CPython), that supports WebSockets, routes, template engine and with really optimized architecture (mem allocations, async I/Os). Ready for ESP32, STM32 on Pyboard, Pycom's chipsets (WiPy, LoPy, ...). Robust, efficient and documented!

  • Updated Aug 20, 2020
  • Python

Improve this page

Add a description, image, and links to the micropython topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the micropython topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.