def _get_jst_from_utime(cls, timestamp):
"""
UNIXTIME ???????????????'+09:00'??????
1471084020 -> '2016-08-13 19:27:00'
:param int timestamp: UNIXTIME???
:rtype: str
"""
return str(datetime.fromtimestamp(timestamp, timezone(timedelta(hours=+9))))[:-6]
# @classmethod
# def _get_utime(cls):
# """
# ??? UNIXTIME ????
#
# '2016-08-13 19:27:00' -> 1471084020
#
# :rtype: int
# """
# return datetime.now().timestamp()
评论列表
文章目录