kopia lustrzana https://github.com/micropython/micropython-lib
time: time_t is at least long int, convert it as such.
Rumors even says that it may be long long on recent 32-bit Linux x86 systems.pull/121/merge
rodzic
c18ef60871
commit
f51d7ec0db
|
@ -40,7 +40,7 @@ def localtime(t=None):
|
|||
t = time()
|
||||
|
||||
t = int(t)
|
||||
a = ustruct.pack('i', t)
|
||||
a = ustruct.pack('l', t)
|
||||
tm_p = localtime_(a)
|
||||
return _c_tm_to_tuple(uctypes.bytearray_at(tm_p, 36))
|
||||
|
||||
|
@ -50,7 +50,7 @@ def gmtime(t=None):
|
|||
t = time()
|
||||
|
||||
t = int(t)
|
||||
a = ustruct.pack('i', t)
|
||||
a = ustruct.pack('l', t)
|
||||
tm_p = gmtime_(a)
|
||||
return _c_tm_to_tuple(uctypes.bytearray_at(tm_p, 36))
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue