Js2Py
Js2Py copied to clipboard
A bug about utc time
JS code: var a = new Date console.log(a) result: 2021-10-10T10:44:41.643Z
When I use js2py model.
I find a bug.
The module cannot be converted to JS results.
Below is what I implemented in python.
import datetime utc = datetime.datetime.utcnow() utc = str(utc)[:-3].replace(" ","T")+"Z" print(utc)