conversion.py 文件源码

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

项目:python-mysql-pool 作者: LuciferJack 项目源码 文件源码
def _struct_time_to_mysql(self, value):
        """
        Converts a time.struct_time sequence to a string suitable
        for MySQL.
        The returned string has format: %Y-%m-%d %H:%M:%S

        Returns a bytes or None when not valid.
        """
        return time.strftime('%Y-%m-%d %H:%M:%S', value).encode('ascii')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号