Format using strftime(). The date part of the timestamp passed to underlying strftime should not be used.
(self, fmt)
| 1548 | |
| 1549 | |
| 1550 | def strftime(self, fmt): |
| 1551 | """Format using strftime(). The date part of the timestamp passed |
| 1552 | to underlying strftime should not be used. |
| 1553 | """ |
| 1554 | # The year must be >= 1000 else Python's strftime implementation |
| 1555 | # can raise a bogus exception. |
| 1556 | timetuple = (1900, 1, 1, |
| 1557 | self._hour, self._minute, self._second, |
| 1558 | 0, 1, -1) |
| 1559 | return _wrap_strftime(self, fmt, timetuple) |
| 1560 | |
| 1561 | def __format__(self, fmt): |
| 1562 | if not isinstance(fmt, str): |
no test coverage detected