Timezones.py 文件源码

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

项目:enigma2-openpli-fulan 作者: Taapat 项目源码 文件源码
def activateTimezone(self, index):
        if len(self.timezones) <= index:
            return

        os.environ['TZ'] = self.timezones[index][1]
        try:
            os.unlink("/etc/localtime")
        except OSError:
            pass
        try:
            os.symlink("/usr/share/zoneinfo/%s" %(self.timezones[index][1]), "/etc/localtime")
        except OSError:
            pass
        try:
            time.tzset()
        except:
            from enigma import e_tzset
            e_tzset()
        if os.path.exists("/proc/stb/fp/rtc_offset"):
            setRTCoffset()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号