Skip to content

Commit b0c9552

Browse files
committed
update docstring
1 parent 3de498e commit b0c9552

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/_pydatetime.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ def isoformat(self, sep='T', timespec='auto'):
21512151
21522152
The optional argument timespec specifies the number of additional
21532153
terms of the time to include. Valid options are 'auto', 'hours',
2154-
'minutes', 'seconds', 'milliseconds' and 'microseconds'.
2154+
'minutes', 'seconds', 'milliseconds', 'microseconds' and 'submicroseconds'.
21552155
"""
21562156
s = ("%04d-%02d-%02d%c" % (self._year, self._month, self._day, sep) +
21572157
_format_time(self._hour, self._minute, self._second,
@@ -2737,3 +2737,7 @@ def _name_from_offset(delta):
27372737
# small dst() may get within its bounds; and it doesn't even matter if some
27382738
# perverse time zone returns a negative dst()). So a breaking case must be
27392739
# pretty bizarre, and a tzinfo subclass can override fromutc() if it is.
2740+
2741+
2742+
if __name__ == "__main__":
2743+
print(datetime.now().isoformat(timespec="submicroseconds"))

0 commit comments

Comments
 (0)