[Python-3000] format and datetime (original) (raw)

Guido van Rossum guido at python.org
Tue Sep 11 05:24:42 CEST 2007


Right. It's odd that there's nothing explicit that exactly produces the default. (Though floats have this issue too -- I wish it could be fixed there too.)

On 9/10/07, skip at pobox.com <skip at pobox.com> wrote:

Paul> The date and time defaults (which appear to be %Y-%m-%d and Paul> %H:%M:%s) seem perfectly acceptable, on the other hand. I would like to see an analog to %S which preserves fractions of a second as the default formatting for time and datetime objects does: >>> print(now) 2007-09-10 22:07:53.654774 >>> print(now.strftime("%H:%M:%S")) 22:07:53 >>> print(now.time()) 22:07:53.654774 Skip


Python-3000 mailing list Python-3000 at python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-3000 mailing list