helper_functions.py 文件源码

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

项目:cryptocompy 作者: ttsteiger 项目源码 文件源码
def date_to_timestamp(date):
    """


    Args:
        date: Date as string with these formats: "Y-m-d", "Y-m-d H-M-S".
    Returns:

    """

    # format input string if only date but no time is provided
    if len(date) == 10:
        date = "{} 00:00:00".format(date)

    return time.mktime(time.strptime(date, '%Y-%m-%d %H:%M:%S')) #
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号