Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

A bug about utc time

Open Esword618 opened this issue 4 years ago • 0 comments

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)

Esword618 avatar Oct 10 '21 10:10 Esword618