MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / isoformat

Method isoformat

tools/python-3.11.9-amd64/Lib/datetime.py:1514–1529  ·  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 o

(self, timespec='auto')

Source from the content-addressed store, hash-verified

1512 return s
1513
1514 def isoformat(self, timespec='auto'):
1515 """Return the time formatted according to ISO.
1516
1517 The full format is 'HH:MM:SS.mmmmmm+zz:zz'. By default, the fractional
1518 part is omitted if self.microsecond == 0.
1519
1520 The optional argument timespec specifies the number of additional
1521 terms of the time to include. Valid options are 'auto', 'hours',
1522 'minutes', 'seconds', 'milliseconds' and 'microseconds'.
1523 """
1524 s = _format_time(self._hour, self._minute, self._second,
1525 self._microsecond, timespec)
1526 tz = self._tzstr()
1527 if tz:
1528 s += tz
1529 return s
1530
1531 __str__ = isoformat
1532

Callers

nothing calls this directly

Calls 2

_tzstrMethod · 0.95
_format_timeFunction · 0.85

Tested by

no test coverage detected