mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Add tm_zone and tm_gmtoff to time.pyi (#551)
* Enable tm_gmtoff and tm_zone only for python >= 3.3.
This commit is contained in:
committed by
Guido van Rossum
parent
93ef68315b
commit
61007ab1dc
@@ -4,6 +4,7 @@
|
||||
# based on: http://docs.python.org/3.2/library/time.html#module-time
|
||||
# see: http://nullege.com/codes/search?cq=time
|
||||
|
||||
import sys
|
||||
from typing import Tuple, Union
|
||||
|
||||
# ----- variables and constants -----
|
||||
@@ -32,7 +33,9 @@ class struct_time:
|
||||
tm_wday = 0
|
||||
tm_yday = 0
|
||||
tm_isdst = 0
|
||||
|
||||
if sys.version_info >= (3, 3):
|
||||
tm_gmtoff = 0
|
||||
tm_zone = 'GMT'
|
||||
|
||||
# ----- functions -----
|
||||
def asctime(t: Union[Tuple[int, int, int, int, int, int, int, int, int],
|
||||
|
||||
Reference in New Issue
Block a user