datetime.py 文件源码

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

项目:liberator 作者: libscie 项目源码 文件源码
def get_tzname(self):
        # Timezone conversions must happen to the input datetime *before*
        # applying a function. 2015-12-31 23:00:00 -02:00 is stored in the
        # database as 2016-01-01 01:00:00 +00:00. Any results should be
        # based on the input datetime not the stored datetime.
        tzname = None
        if settings.USE_TZ:
            if self.tzinfo is None:
                tzname = timezone.get_current_timezone_name()
            else:
                tzname = timezone._get_timezone_name(self.tzinfo)
        return tzname
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号