[docs] strftime %S

Sandro Tosi matrixhasu at gmail.com
Sun Jun 17 19:01:54 CEST 2012


Hello Nick,

On Tue, Jun 12, 2012 at 1:18 AM, Nick Merrill
<nicholas.e.merrill at gmail.com>wrote:

> [image: Inline image 1]
> strftime("%S") should be [0,59] , right? Thanks!
>

You don't say what version of the documentation you're reading but at the
most right column of that table for the '%S' directive there's a note:

    The range really is 0 to 61; according to the Posix standard this
accounts for leap seconds and the (very rare) double leap seconds. The time
module may produce and does accept leap seconds since it is based on the
Posix standard, but the datetime module does not accept leap seconds in
strptime() input nor will it produce them in strftime() output.

http://docs.python.org/library/datetime.html?highlight=strftime#strftime-and-strptime-behavior

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20120617/27120a84/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2012-06-11 at 7.17.10 PM.png
Type: image/png
Size: 21394 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20120617/27120a84/attachment-0001.png>


More information about the docs mailing list