Author akira
Recipients Daniel.O'Connor, akira, belopolsky, bignose, mumino, r.david.murray, santoso.wijaya, tim.peters, vstinner
Date 2014-07-01.15:26:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404228408.45.0.636037918489.issue12750@psf.upfronthosting.co.za>
In-reply-to
Content
> ``%s`` format code behaviour was undefined and incidental.

strftime('%s') is not portable but it *is* supported on some
platforms i.e., it is *not* undefined and it is *not* incidental
on these platforms. datetime.strftime *delegates* to the platform
strftime(3) and some platforms do support %s format code. See the
quote from the datetime docs in msg221385.

It would be preferable that datetime.strftime would reject format
codes that it doesn't support explicitly (like datetime.strptime
does) so that datetime.strftime were portable but that ship
has sailed.

This issue could be titled: add cross-platform support for %s
strftime-format code (and fix its behavior (add support) for
timezone-aware datetime objects).

---

If the implementation uses floats to get an integer result; it should
have tests for edge cases (datetime.min, datetime.max at least). I
don't see such tests, please, correct me if I'm wrong.
History
Date User Action Args
2014-07-01 15:26:48akirasetrecipients: + akira, tim.peters, belopolsky, vstinner, r.david.murray, santoso.wijaya, bignose, Daniel.O'Connor, mumino
2014-07-01 15:26:48akirasetmessageid: <1404228408.45.0.636037918489.issue12750@psf.upfronthosting.co.za>
2014-07-01 15:26:48akiralinkissue12750 messages
2014-07-01 15:26:48akiracreate