python获取本地时间

import datetime
print datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')

原文地址:https://www.cnblogs.com/yushengzhou/p/9518676.html