def modtime():
""" Get the current local time as a string in iso format """
if six.PY2:
local_tz = get_localzone()
now = datetime.utcnow().replace(tzinfo=pytz.utc).astimezone(local_tz)
else:
now = datetime.now(timezone.utc).astimezone()
nowstr = now.replace(microsecond=0).isoformat()
return nowstr
评论列表
文章目录