Skip to content

Commit 50ae5ef

Browse files
committed
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.
1 parent f51d7ec commit 50ae5ef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

time/time.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def _c_tm_to_tuple(tm):
2525
t = ustruct.unpack("@iiiiiiiii", tm)
2626
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]])
2727

28+
def struct_time(tm):
29+
return tm
30+
2831

2932
def strftime(format, t=None):
3033
if t is None:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy