Author denis-osipov
Recipients denis-osipov
Date 2017-09-17.17:06:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505668016.98.0.422886710849.issue31498@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2017-09-17 17:06:57denis-osipovsetrecipients: + denis-osipov
2017-09-17 17:06:56denis-osipovsetmessageid: <1505668016.98.0.422886710849.issue31498@psf.upfronthosting.co.za>
2017-09-17 17:06:56denis-osipovlinkissue31498 messages
2017-09-17 17:06:56denis-osipovcreate