python 2.5.4 与2.5.5的一个小区别

请看加粗字体的不同:

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> now = datetime.now()
>>> now
datetime.datetime(2010, 10, 21, 9, 20, 34, 656000)
>>> now.strftime("%Y-%m-%d %H:%M:%S")
'2010-10-21 09:20:34'
>>> now.strftime("%Y-%m-%d %H:%i:%S")
'2010-10-21 09::34'
 
 
 
Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> now = datetime.now()
>>> now
datetime.datetime(2010, 10, 21, 9, 18, 34, 361812)
>>> now.strftime("%Y-%m-%d %H:%M:%S")
'2010-10-21 09:18:34'
>>> now.strftime("%Y-%m-%d %H:%i:%S")
'2010-10-21 09:%i:34'

>>>

posted on 2010-10-23 15:58  ddper  阅读(204)  评论(0编辑  收藏  举报

导航