wokwi / rp2040js

A Raspberry Pi Pico Emulator in JavaScript
MIT License
384 stars 40 forks source link

Fix #77 #110

Closed mingpepe closed 1 year ago

mingpepe commented 1 year ago

Fix #77

# Emulator
>>> import time
>>> time.time()
1609459200
# PC
>> import datetime
>> datetime.datetime.fromtimestamp(1609459200)
datetime.datetime(2021, 1, 1, 8, 0)

Work as expected, the date is set by MicroPython https://github.com/micropython/micropython/blob/1b774b373eb7fafebaa43adf9e086a690461201d/ports/rp2/main.c#L105-L115

But currently, there is no clock to update its time. Always get the same value.