Format using strftime(). The date part of the timestamp passed to underlying strftime should not be used.
(self, format)
| 1627 | raise ValueError(f'Invalid isoformat string: {time_string!r}') |
| 1628 | |
| 1629 | def strftime(self, format): |
| 1630 | """Format using strftime(). The date part of the timestamp passed |
| 1631 | to underlying strftime should not be used. |
| 1632 | """ |
| 1633 | # The year must be >= 1000 else Python's strftime implementation |
| 1634 | # can raise a bogus exception. |
| 1635 | timetuple = (1900, 1, 1, |
| 1636 | self._hour, self._minute, self._second, |
| 1637 | 0, 1, -1) |
| 1638 | return _wrap_strftime(self, format, timetuple) |
| 1639 | |
| 1640 | def __format__(self, fmt): |
| 1641 | if not isinstance(fmt, str): |
no test coverage detected