time: Add dummy struct_time constructor.

CPython compatibility. As we don't have a proper struct_time, and use
tuple instead, the constructor is identity function.
pull/121/merge
Paul Sokolovsky 2017-09-04 12:59:19 +03:00
rodzic f51d7ec0db
commit 50ae5ef4aa
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -25,6 +25,9 @@ def _c_tm_to_tuple(tm):
t = ustruct.unpack("@iiiiiiiii", tm)
return tuple([t[5] + 1900, t[4] + 1, t[3], t[2], t[1], t[0], (t[6] - 1) % 7, t[7] + 1, t[8]])
def struct_time(tm):
return tm
def strftime(format, t=None):
if t is None: