datetime.py 文件源码

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

项目:liberator 作者: libscie 项目源码 文件源码
def as_sql(self, compiler, connection):
        # Cast to date rather than truncate to date.
        lhs, lhs_params = compiler.compile(self.lhs)
        tzname = timezone.get_current_timezone_name() if settings.USE_TZ else None
        sql, tz_params = connection.ops.datetime_cast_date_sql(lhs, tzname)
        lhs_params.extend(tz_params)
        return sql, lhs_params
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号