(wmi_time)
return year, month, day, hours, minutes, seconds, microseconds, timezone
Convenience wrapper to take a WMI datetime string of the form
    yyyymmddHHMMSS.mmmmmm+UUU and return a 9-tuple containing the
    individual elements, or None where string contains placeholder
    stars.

    :param wmi_time: The WMI datetime string in `yyyymmddHHMMSS.mmmmmm+UUU` format

    :returns: A 9-tuple of (year, month, day, hours, minutes, seconds, microseconds, timezone)
Convenience wrapper to take a WMI datetime string of the form
    yyyymmddHHMMSS.mmmmmm+UUU and return a 9-tuple containing the
    individual elements, or None where string contains placeholder
    stars.
Convenience wrapper to take a WMI datetime string of the form yyyymmddHHMMSS . mmmmmm + UUU and return a 9 - tuple containing the individual elements or None where string contains placeholder stars .
def to_time(wmi_time):
    # type: (str) -> Tuple[Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[str]]
    """Convenience wrapper to take a WMI datetime string of the form
    yyyymmddHHMMSS.mmmmmm+UUU and return a 9-tuple containing the
    individual elements, or None where string contains placeholder
    stars.

    :param wmi_time: The WMI datetime string in `yyyymmddHHMMSS.mmmmmm+UUU` format

    :returns: A 9-tuple of (year, month, day, hours, minutes, seconds, microseconds, timezone)
    """

    def int_or_none(s, start, end):
        # type: (str, int, int) -> Optional[int]
        try:
            return int(s[start:end])
        except ValueError:
            return None

    year = int_or_none(wmi_time, 0, 4)
    month = int_or_none(wmi_time, 4, 6)
    day = int_or_none(wmi_time, 6, 8)
    hours = int_or_none(wmi_time, 8, 10)
    minutes = int_or_none(wmi_time, 10, 12)
    seconds = int_or_none(wmi_time, 12, 14)
    microseconds = int_or_none(wmi_time, 15, 21)
    timezone = wmi_time[22:]  # type: Optional[str]

    if timezone == "***":
        timezone = None

    return year, month, day, hours, minutes, seconds, microseconds, timezone
def to_time ( wmi_time ) : # type: (str) -> Tuple[Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[int], Optional[str]] def int_or_none ( s , start , end ) : # type: (str, int, int) -> Optional[int] try : return int ( s [ start : end ] ) except ValueError : return None year = int_or_none ( wmi_time , 0 , 4 ) month = int_or_none ( wmi_time , 4 , 6 ) day = int_or_none ( wmi_time , 6 , 8 ) hours = int_or_none ( wmi_time , 8 , 10 ) minutes = int_or_none ( wmi_time , 10 , 12 ) seconds = int_or_none ( wmi_time , 12 , 14 ) microseconds = int_or_none ( wmi_time , 15 , 21 ) timezone = wmi_time [ 22 : ] # type: Optional[str] if timezone == "***" : timezone = None return year , month , day , hours , minutes , seconds , microseconds , timezone