New submission from Denis Osipov:
Now default values for zero in time.strftime returns string with day of week
value 1:
>>> time.strftime("%Y %m %d %H %M %S %w %j", (2000,)+(0,)*8)
'2000 01 01 00 00 00 1 001'
while 2000-01-01 is Saturday (=6th day of week).
Now each illegal value (day of month < 1 etc.) are forced to a correct one (by
the way why now day of week isn't 0=Sunday and forced to 1). Maybe strftime
also should force day of week to according to the date (%Y %m %d) if it's given.
>>> time.strftime("%Y %m %d %H %M %S %w %j", (2000,)+(0,)*8)
'2000 01 01 00 00 00 6 001'
----------
components: Interpreter Core
messages: 302374
nosy: denis-osipov
priority: normal
severity: normal
status: open
title: Default values for zero in time.strftime()
type: behavior
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com