utils.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:sweetshot 作者: AnCh7 项目源码 文件源码
def formatTimeFromNow(secs=0):
    """ Properly Format Time that is `x` seconds in the future

        :param int secs: Seconds to go in the future (`x>0`) or the
                         past (`x<0`)
        :return: Properly formated time for Graphene (`%Y-%m-%dT%H:%M:%S`)
        :rtype: str

    """
    return datetime.utcfromtimestamp(time.time() + int(secs)).strftime('%Y-%m-%dT%H:%M:%S')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号