MCPcopy Index your code
hub / github.com/RustPython/RustPython / isoformat

Method isoformat

Lib/_pydatetime.py:1594–1609  ·  view source on GitHub ↗

Return the time formatted according to ISO. The full format is 'HH:MM:SS.mmmmmm+zz:zz'. By default, the fractional part is omitted if self.microsecond == 0. The optional argument timespec specifies the number of additional terms of the time to include. Valid options

(self, timespec='auto')

Source from the content-addressed store, hash-verified

1592 return s
1593
1594 def isoformat(self, timespec='auto'):
1595 """Return the time formatted according to ISO.
1596
1597 The full format is 'HH:MM:SS.mmmmmm+zz:zz'. By default, the fractional
1598 part is omitted if self.microsecond == 0.
1599
1600 The optional argument timespec specifies the number of additional
1601 terms of the time to include. Valid options are 'auto', 'hours',
1602 'minutes', 'seconds', 'milliseconds' and 'microseconds'.
1603 """
1604 s = _format_time(self._hour, self._minute, self._second,
1605 self._microsecond, timespec)
1606 tz = self._tzstr()
1607 if tz:
1608 s += tz
1609 return s
1610
1611 __str__ = isoformat
1612

Callers

nothing calls this directly

Calls 2

_tzstrMethod · 0.95
_format_timeFunction · 0.85

Tested by

no test coverage detected