效果圖:
# -*-coding: utf-8 -*- """ python時間相關 """ import time import datetime
timestampNow=time.time() print timestampNow >>> 1495355013.86
dateNow = datetime.datetime.now() print dateNow >>> 2017-05-21 16:23:33.858233