from time import strftime,localtimeprint '%s :time' %strftime('%Y-%m-%d %H:%M:%S',localtime())#该片段来自于http://www.codesnippet.cn/detail/110220148673.html
来源: http://www.codesnippet.cn/detail/110220148673.html