kopia lustrzana https://github.com/micropython/micropython-lib
datetime: Add default utc tz for datetime.now().
Signed-off-by: Patrick Joy <patrick@joytech.com.au>pull/570/head
rodzic
50b7aca171
commit
c05655fac9
|
@ -635,10 +635,9 @@ class datetime:
|
|||
else:
|
||||
us = 0
|
||||
if tz is None:
|
||||
raise NotImplementedError
|
||||
else:
|
||||
dt = cls(*_tmod.gmtime(ts)[:6], microsecond=us, tzinfo=tz)
|
||||
dt = tz.fromutc(dt)
|
||||
tz = timezone.utc
|
||||
dt = cls(*_tmod.gmtime(ts)[:6], microsecond=us, tzinfo=tz)
|
||||
dt = tz.fromutc(dt)
|
||||
return dt
|
||||
|
||||
@classmethod
|
||||
|
|
Ładowanie…
Reference in New Issue