K i ddlZddlZddlZddlZddlZddlZddlZddlmZejdZ dZ ddZ d dZ d dZy) N) windows_tztzlocalcttjj|jj S)zCGet timezone's offset using built-in function datetime.utcoffset().)intdatetimenow utcoffset total_seconds)tzs S/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/tzlocal/utils.py get_tz_offsetr s0 x  $$R(224BBD EEc2t|}tjtjtjtj z }t ||z dkDr,d|d|d}|r t|tj|yy)aJAssert that system's timezone offset equals to the timezone offset found. If they don't match, we probably have a misconfiguration, for example, an incorrect timezone set in /etc/timezone file in systemd distributions. If error is True, this method will raise a ValueError, otherwise it will emit a warning. <z.Timezone offset does not match system offset: z != z". Please, check your config files.N) r calendartimegmtime localtimegmtimeabs ValueErrorwarningswarn)r error tz_offset system_offsetmsgs r assert_tz_offsetrsb!IOODNN$45 8VVM 9} $%*rEsE g "F . Fr