(self, wmi_ts)
return int(calendar.timegm(dt.timetuple()))
Convert a wmi formatted timestamp into an epoch.
Convert a wmi formatted timestamp into an epoch.
Convert a wmi formatted timestamp into an epoch .
def _wmi_to_ts(self, wmi_ts):
        """Convert a wmi formatted timestamp into an epoch."""
        year, month, day, hour, minute, second, microsecond, tz = to_time(wmi_ts)
        tz_delta = timedelta(minutes=int(tz))
        if '+' in wmi_ts:
            tz_delta = -tz_delta

        dt = (
            datetime(year=year, month=month, day=day, hour=hour, minute=minute, second=second, microsecond=microsecond)
            + tz_delta
        )
        return int(calendar.timegm(dt.timetuple()))
def _wmi_to_ts ( self , wmi_ts ) : year , month , day , hour , minute , second , microsecond , tz = to_time ( wmi_ts ) tz_delta = timedelta ( minutes = int ( tz ) ) if '+' in wmi_ts : tz_delta = - tz_delta dt = ( datetime ( year = year , month = month , day = day , hour = hour , minute = minute , second = second , microsecond = microsecond ) + tz_delta ) return int ( calendar . timegm ( dt . timetuple ( ) ) )