base.py 文件源码

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

项目:My-Web-Server-Framework-With-Python2.7 作者: syjsu 项目源码 文件源码
def TimestampFromTicks(self, secs):
        """
        Returns an object representing the date and time ``secs`` seconds
        after the epoch. For example:

        .. python::

            import time

            d = db.TimestampFromTicks(time.time())

        This method is equivalent to the module-level ``TimestampFromTicks()``
        method in an underlying DB API-compliant module.

        :Parameters:
            secs : int
                the seconds from the epoch

        :return: an object containing the timestamp
        """
        dt = datetime.now()
        return self.__driver.get_import().Timestamp(dt.year, dt.month, dt.day,
                                                    dt.hour, dt.minute, dt.second)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号