Mpjn$ddlZddlZddlZddlZddlZddlmZddlmZda da ejdZ d dZ dZd dZdefd Zdej$fd Zdej$fd Zy) N)timezone)utilstzlocalc tj}|r|Stjj tjj |drKt jdddl} |jddgjj}|Si}dD]}tjj ||} t|d 5}|j}t j|d ||jd } | s dddy| j!D]L} d | vr| j#d d\} } d| vr| j#dd\} } | s8| j%d d||<N dddt)j*d} t)j*d} t)j*d} dD]}tjj ||} t|d5}|j-}t j|d |dddD]}| j/|}|| j/|}|*||j1d}| j3|}|t5j6d|d|l|d|j9} | j%d d||<tjj |d}tjj |rtjj;|rt j|dtjj=|} | j?ddz}|dk7r6| |d} tAjB| |d}| j%d d||< tG|dkDrt jtG|d|tG|dkDrtI||}tG|dk7rddtK|jMvrIt jOd|jQDcic] \}}d|vs ||}}}tI||}tG|dk7r?d}|jQD]\}}||d |d!z }|d"z }tAjD|tS|jUdSy#t|jf$rt jdY^wxYw#1swYxYw#tt&f$rY}wxYw#1swYxYw#tt&f$rY|wxYw#t@jD$rYnwxYw| j?ddz}|dk7r cc}}w)#aKTries to find the local timezone configuration. This method finds the timezone name, if it can, or it returns None. The parameter _root makes the function look for files like /etc/localtime beneath the _root directory. This is primarily used by the tests. In normal usage you call the function without parameters.zsystem/bin/getpropzThis looks like TermuxrNgetpropzpersist.sys.timezonezIt's not termux?) etc/timezonezvar/db/zoneinfoascii)encodingz found, contents: z/  #_z\s*ZONE\s*=\s*\"z\s*TIMEZONE\s*=\s*\"")zetc/sysconfig/clockzetc/conf.d/clockrtzSyntax error in z. Ignoring line: etc/localtimez found/z is a symlink toz found: rzz/etc/timezone is deprecated in some distros, and no longer reliable. tzlocal is ignoring it, and you can likely delete it.z5Multiple conflicting time zone configurations found: z:  zJFix the configuration, or set the time zone in a TZ environment variable. )+r_tz_name_from_envospathexistsjoinlogdebug subprocess check_outputstripdecodeOSErrorCalledProcessErroropenread splitlinessplitreplaceUnicodeDecodeErrorrecompile readlinesmatchendsearchwarningswarnstartislinkrealpathfindzoneinfoZoneInfoZoneInfoNotFoundErrorlen_get_unique_tzsstrkeyswarningitemslistvalues)_roottzenvr androidtz found_configs configfiletzpathtzfiledataetctzrzone_re timezone_reend_refilenameliner*tzline end_matchr/tzinfo unique_tzskvmessagekeyvalues Z/mnt/ssd/data/Dropbox/adrian/scripts/msg_venv/lib/python3.12/site-packages/tzlocal/unix.py_get_localzone_namerVsZ  # # %E   ww~~bggll5*>?@ *+ "//jj,-G**45K ZZ_F?eX. fd# Av'') VH$8?@ A D d+='--d3E$!%))+-0F & f 5I ( (8@QRVQW&XY "#5IOO$56E-2MM#s,CM&)# D@WW\\% 1F ww~~f"''.."8 VHF#$  ( 3!#qj%&ME !!%("8#34(- c3(? f%  =A S'( =/BC }  !(>J:!##m>P>P>R:S(S  L3@2E2E2G c$!Q>abKbA c c,]EB :!#R"/"5"5"73JC#br22G3hh44W==M((*+A..9667  II( )   D D&+,     A A.+,   &11  JJsOa'Eqj:!ds00S T?TTAT>T- T39+T&$3T3A,T3:/U  U?U?*T?TT TT#"T#&T0 +T33UU UUc t}tjj|ddd}t |j tjj }|jD]}tjjtjj|g|j d}dj|j tjj |d}|j||S)Nusrsharer3r) setrrrr6r$sepr=r1add)rAr>rO zoneinfopathdirectory_depthtznamerreal_zone_names rUr7r7sJ77<<ugzBL,,,RWW[[9:O&&('ww \ NFLLr?r_rJrCrDtzxutcnames rU_get_localzoneros4    E   'F ~ >?D "HWW\\%2F77>>&)fd# v&&00W0E    " MMW X"*">">"@OQEQJqOGO&&wqz2\\   v & | r/ I#   Ps #E% E!/E!E returnc.t tatS)z9Get the computers configured local timezone name, if any.)_cache_tz_namerVrarUget_localzone_namerts,. rac.t tatS)z4Get the computers configured local timezone, if any.) _cache_tzrorsrarU get_localzonerws"$ rac6tatatS)zOReload the cached localzone. You need to call this if the timezone has changed.)rVrrrorvrsrarUreload_localzonerys)*N I ra)r)loggingrr'r-r3datetimerrrrvrr getLoggerrrVr7ror8rtr4rwryrsrarUr}sx   g "R/j )XCx(((++ra