(self, x)
| 1623 | return ASN1_GENERALIZED_TIME(datetime.strptime(x, self._TIME_FIELD.strf)) |
| 1624 | |
| 1625 | def _time_to_filetime(self, x): |
| 1626 | if isinstance(x, str) and x.strip() == "NEVER": |
| 1627 | return FILETIME(dwHighDateTime=0x7FFFFFFF, dwLowDateTime=0xFFFFFFFF) |
| 1628 | if isinstance(x, str): |
| 1629 | x = self._time_to_int(x) |
| 1630 | else: |
| 1631 | x = self._utc_to_mstime(x) |
| 1632 | return FILETIME( |
| 1633 | dwHighDateTime=(x >> 32) & 0xFFFFFFFF, |
| 1634 | dwLowDateTime=x & 0xFFFFFFFF, |
| 1635 | ) |
| 1636 | |
| 1637 | def _filetime_totime(self, x): |
| 1638 | if x.dwHighDateTime == 0x7FFFFFFF and x.dwLowDateTime == 0xFFFFFFFF: |
no test coverage detected