hyb
2025-12-30 399ffc4d9829f70529d3b096fe4228f7496cc566
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Ë
Yñúh‡2ãó$—dZddlZddlZddlmZddlmZ    ddlZddlmZddl m Z gd    ¢Z ejd
«Zd Zd Zd Zd„Ze«ZGd„de«ZGd„de «ZGd„de«ZGd„de«Zd„Zd„Zy#e    $r    e
d«‚wxYw)zä
This module provides an interface to the native time zone data on Windows,
including :py:class:`datetime.tzinfo` implementations.
 
Attempting to import this module on a non-Windows platform will raise an
:py:obj:`ImportError`.
éN)Úwinreg)Ú    text_type)Úwintypesz#Running tzwin on non-Windows systemé)Ú tzrangebase)ÚtzwinÚ
tzwinlocalÚtzreséz7SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zonesz4SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zonesz4SYSTEM\CurrentControlSet\Control\TimeZoneInformationcóö—tjdtj«}    tj|t«j «t}|j «|S#t $r    t}YŒ#wxYw©N)rÚConnectRegistryÚHKEY_LOCAL_MACHINEÚOpenKeyÚ TZKEYNAMENTÚCloseÚ WindowsErrorÚ TZKEYNAME9X)ÚhandleÚ    TZKEYNAMEs  úBH:\Change_password\venv_build\Lib\site-packages\dateutil/tz/win.pyÚ _settzkeynamer"sb€Ü × #Ñ # D¬&×*CÑ*CÓ D€Fð Ü‰vœ{Ó+×1Ñ1Ô3܈    ð ‡LL„NØ Ðøô ò ÜŠ    ð ús¦.A&Á&A8Á7A8có\—eZdZdZej
ej«Zdd„Z    d„Z
d„Z y)r
z}
    Class for accessing ``tzres.dll``, which contains timezone name related
    resources.
 
    .. versionadded:: 2.5.0
    có,—tjd«}tjtjtj
tj f|j_|j|_tj|«|_    ||_
y)NÚuser32) ÚctypesÚWinDLLrÚ    HINSTANCEÚUINTÚLPWSTRÚc_intÚ LoadStringWÚargtypesÚ_tzresÚ    tzres_loc)Úselfr%rs   rÚ__init__ztzres.__init__9sg€ä—‘˜xÓ(ˆô(0×'9Ñ'9Ü'/§}¡}Ü'/§¡Ü'-§|¡|ð'5ˆ×ÑÔ#ð
"×-Ñ-ˆÔÜ—m‘m IÓ.ˆŒ Ø"ˆócóê—|j«}tjtj|«tj
«}|j |jj||d«}|d|S)aÜ
        Load a timezone name from a DLL offset (integer).
 
        >>> from dateutil.tzwin import tzres
        >>> tzr = tzres()
        >>> print(tzr.load_name(112))
        'Eastern Standard Time'
 
        :param offset:
            A positive integer value referring to a string from the tzres dll.
 
        .. note::
 
            Offsets found in the registry are generally of the form
            ``@tzres.dll,-114``. The offset in this case is 114, not -114.
 
        rN)    Úp_wcharrÚcastÚbyrefrr r"r$Ú_handle)r&ÚoffsetÚresourceÚlpBufferÚnchars     rÚ    load_nameztzres.load_nameGsY€ð$—<‘<“>ˆÜ—;‘;œvŸ|™|¨HÓ5´x·±ÓGˆØ× Ñ  §¡×!4Ñ!4°f¸hÈÓJˆØ˜˜ÐÐr(cóª—|jd«s|S|jd«}    t|d«}|j    |«S#td«‚xYw)aŸ
        Parse strings as returned from the Windows registry into the time zone
        name as defined in the registry.
 
        >>> from dateutil.tzwin import tzres
        >>> tzr = tzres()
        >>> print(tzr.name_from_string('@tzres.dll,-251'))
        'Dateline Daylight Time'
        >>> print(tzr.name_from_string('Eastern Standard Time'))
        'Eastern Standard Time'
 
        :param tzname_str:
            A timezone name string as returned from a Windows registry key.
 
        :return:
            Returns the localized timezone string from tzres.dll if the string
            is of the form `@tzres.dll,-offset`, else returns the input string.
        ú@z,-rzMalformed timezone string.)Ú
startswithÚsplitÚintÚ
ValueErrorr2)r&Ú
tzname_strÚ    name_spltr.s    rÚname_from_stringztzres.name_from_string^s_€ð&×$Ñ$ SÔ)ØÐ à×$Ñ$ TÓ*ˆ    ð    ;ܘ 1™Ó&ˆFð~‰~˜fÓ%Ð%øð    ;ÜÐ9Ó:Ð :ús ¦AÁ AN)z    tzres.dll) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚPOINTERrÚWCHARr*r'r2r;©r(rr
r
0s,„ñð ˆfn‰n˜XŸ^™^Ó,€Gó #ò ó.&r(r
cóN—eZdZdZd„Zd„Zed„«Zd„Zd„Z    d„Z
e d„«Z y    )
Ú    tzwinbasezBtzinfo class based on win32's timezones available in the registry.có—td«‚)Nz#tzwinbase is an abstract base class)ÚNotImplementedError©r&s rr'ztzwinbase.__init__s€Ü!Ð"GÓHÐHr(có¶—t|t«stS|j|jk(xr(|j|jk(xr |j
|j
k(xrñ|j |j k(xrÖ|j|jk(xr»|j|jk(xr |j|jk(xr…|j|jk(xrj|j|jk(xrO|j|jk(xr4|j|jk(xr|j|jk(Sr )Ú
isinstancerDÚNotImplementedÚ _std_offsetÚ _dst_offsetÚ _stddayofweekÚ _dstdayofweekÚ_stdweeknumberÚ_dstweeknumberÚ_stdhourÚ_dsthourÚ
_stdminuteÚ
_dstminuteÚ    _std_abbrÚ    _dst_abbr)r&Úothers  rÚ__eq__ztzwinbase.__eq__‚s<€ä˜%¤Ô+Ü!Ð !à×!Ñ! U×%6Ñ%6Ñ6ó 3Ø×!Ñ! U×%6Ñ%6Ñ6ó 3à×#Ñ# u×':Ñ':Ñ:ò 3ð×#Ñ# u×':Ñ':Ñ:ò 3ð×$Ñ$¨×(<Ñ(<Ñ<ò     3ð
×$Ñ$¨×(<Ñ(<Ñ<ò 3ð —‘ %§.¡.Ñ0ò 3ð—‘ %§.¡.Ñ0ò 3ð—‘ E×$4Ñ$4Ñ4ò 3ð—‘ E×$4Ñ$4Ñ4ò 3ð—‘ 5§?¡?Ñ2ò 3ð—‘ 5§?¡?Ñ2ð     4r(c    óf—tjdtj«5}tj|t«5}t tj |«d«Dcgc]}tj||«‘Œ}}ddd«ddd«Scc}w#1swYŒxYw#1swYSxYw)z4Return a list of all time zones known to the system.Nr)rrrrrÚrangeÚ QueryInfoKeyÚEnumKey)rÚtzkeyÚiÚresults    rÚlistztzwinbase.list”s¬€ô× #Ñ # D¬&×*CÑ*CÓ Dð    IÈÜ—‘ ¬    Ó2ð I°eä#(¬×)<Ñ)<¸UÓ)CÀAÑ)FÓ#GöIØô!Ÿ.™.¨°Õ2ðIðI÷ I÷    Iðˆ ùòI÷ Ið Iú÷    Iðˆ ús5¥B&Á$BÁ$BÂBÂB&ÂBÂB#    ÂB&Â&B0có—|jS)z;
        Return the display name of the time zone.
        )Ú_displayrGs rÚdisplayztzwinbase.displays€ð}‰}Ðr(cóJ—|jsyt||j|j|j|j
|j «}t||j|j|j|j|j«}||jz}||fS)aô
        For a given year, get the DST on and off transition times, expressed
        always on the standard time side. For zones with no transitions, this
        function returns ``None``.
 
        :param year:
            The year whose transitions you would like to query.
 
        :return:
            Returns a :class:`tuple` of :class:`datetime.datetime` objects,
            ``(dston, dstoff)`` for zones with an annual DST transition, or
            ``None`` for fixed offset zones.
        N) ÚhasdstÚpicknthweekdayÚ    _dstmonthrNrRrTrPÚ    _stdmonthrMrQrSrOÚ_dst_base_offset)r&ÚyearÚdstonÚdstoffs    rÚ transitionsztzwinbase.transitions£sŒ€ð{Š{Øä˜t T§^¡^°T×5GÑ5GØ#Ÿ}™}¨d¯o©oØ#×2Ñ2ó4ˆô   d§n¡n°d×6HÑ6HØ $§ ¡ ¨t¯©Ø $× 3Ñ 3ó5ˆð
    $×'Ñ'Ñ'ˆàfˆ}Ðr(có —|jdk7S)Nr)rgrGs rÚ _get_hasdstztzwinbase._get_hasdstÂs€Ø~‰~ Ñ"Ð"r(có—|jSr )Ú_dst_base_offset_rGs rriztzwinbase._dst_base_offsetÅs€à×%Ñ%Ð%r(N) r<r=r>r?r'rXÚ staticmethodr`rcrmroÚpropertyrirBr(rrDrD}sG„ÙLòIò4ð$ñóðòò ò>#ðñ&óñ&r(rDcó"—eZdZdZd„Zd„Zd„Zy)ra»
    Time zone object created from the zone info in the Windows registry
 
    These are similar to :py:class:`dateutil.tz.tzrange` objects in that
    the time zone data is provided in the format of a single offset rule
    for either 0 or 2 time zone transitions per year.
 
    :param: name
        The name of a Windows time zone key, e.g. "Eastern Standard Time".
        The full list of keys can be retrieved with :func:`tzwin.list`.
    có,—||_tjdtj«5}t    d«j t |¬«}tj||«5}t|«}ddd«ddd«d|_    |d|_
|d|_ tjd|d«}|d |d    z
}||d
z
}tj|¬ «|_tj|¬ «|_|d d \|_|_|_|_|_|dd\|_|_|_|_|_|j"|j z
|_|j;«|_y#1swYŒxYw#1swYŒxYw)Nz {kn}\{name})ÚknÚnameÚStdÚDltÚDisplayz=3l16hÚTZIrré©Úminuteséé    é é)Ú_namerrrrÚformatrrÚ valuestodictrUrVrbÚstructÚunpackÚdatetimeÚ    timedeltarKrLrhrMrOrQrSrgrNrPrRrTrqrore)    r&rwrÚ    tzkeynamer]ÚkeydictÚtupÚ    stdoffsetÚ    dstoffsets             rr'ztzwin.__init__×s}€ØˆŒ
ä × #Ñ # D¬&×*CÑ*CÓ Dð    .ÈÜ! .Ó1×8Ñ8¼IÈDÐ8ÓQˆIÜ—‘ ¨    Ó2ð .°eÜ& uÓ-÷ .÷    .ð
! ™ˆŒØ  ™ˆŒà     Ñ*ˆŒ ôm‰m˜H g¨e¡nÓ5ˆØ˜‘VG˜C ™F‘Nˆ    Ø˜c !™fÑ$ˆ    Ü#×-Ñ-°iÔ@ˆÔÜ#×-Ñ-°iÔ@ˆÔð   !˜Hñ        ˆŒØ     Ô    Ø     Ô    Ø     ŒØ     Œð    2˜Jñ        ˆŒØ     Ô    Ø     Ô    Ø     ŒØ     Œà!%×!1Ñ!1°D×4DÑ4DÑ!DˆÔØ×&Ñ&Ó(ˆ ÷= .ñ .ú÷    .ñ    .ús#¬7F    Á# E<Á/F    Å<F    ÆF    Æ    Fcó2—dt|j«zS)Nz    tzwin(%s))ÚreprrƒrGs rÚ__repr__ztzwin.__repr__üs€ØœT $§*¡*Ó-Ñ-Ð-r(có4—|j|jffSr )Ú    __class__rƒrGs rÚ
__reduce__ztzwin.__reduce__ÿs€Ø—‘ §¡  Ð.Ð.r(N)r<r=r>r?r'r‘r”rBr(rrrÊs„ñ
ò#)òJ.ó/r(rcó(—eZdZdZd„Zd„Zd„Zd„Zy)r    a,
    Class representing the local time zone information in the Windows registry
 
    While :class:`dateutil.tz.tzlocal` makes system calls (via the :mod:`time`
    module) to retrieve time zone information, ``tzwinlocal`` retrieves the
    rules directly from the Windows registry and creates an object like
    :class:`dateutil.tz.tzwin`.
 
    Because Windows does not have an equivalent of :func:`time.tzset`, on
    Windows, :class:`dateutil.tz.tzlocal` instances will always reflect the
    time zone settings *at the time that the process was started*, meaning
    changes to the machine's time zone settings during the run of a program
    on Windows will **not** be reflected by :class:`dateutil.tz.tzlocal`.
    Because ``tzwinlocal`` reads the registry directly, it is unaffected by
    this issue.
    có—tjdtj«5}tj|t«5}t |«}ddd«d|_|d|_    td«jt|j ¬«}tj||«5}t |«}|d|_ ddd«ddd«d |dz
}||dz
}tj|¬    «|_tj|¬    «|_t#j$d
|d «}    |    d d \|_|_|_|_|    d|_t#j$d
|d«}    |    d d \|_|_|_|_|    d|_|j |jz
|_|j=«|_y#1swYŒ…xYw#1swYŒxYw#t$r d|_ YŒ5wxYw#1swYŒ;xYw)NÚ StandardNameÚ DaylightNamez    {kn}\{sn})rvÚsnrzÚBiasÚ StandardBiasÚ DaylightBiasr}z=8hÚ StandardStartrér Ú DaylightStart) rrrrÚTZLOCALKEYNAMEr…rUrVrr„rrbÚOSErrorrˆr‰rKrLr†r‡rhrOrQrSrMrgrPrRrTrNrqrore)
r&rÚ
tzlocalkeyr‹rŠr]Ú_keydictrrŽrŒs
          rr'ztzwinlocal.__init__sö€Ü × #Ñ # D¬&×*CÑ*CÓ Dð    %ÈÜ—‘ ¬Ó7ð 3¸:Ü& zÓ2÷ 3ð% ^Ñ4ˆDŒNØ$ ^Ñ4ˆDŒNð %Ü% lÓ3×:Ñ:¼iØ=A¿^¹^ð;óM    ä—^‘^ F¨IÓ6ð8¸%Ü+¨EÓ2HØ$,¨YÑ$7D”M÷8÷    %ð ˜V‘_Ð$ W¨^Ñ%<Ñ<ˆ    Ø˜g nÑ5Ñ5ˆ    ä#×-Ñ-°iÔ@ˆÔÜ#×-Ñ-°iÔ@ˆÔôm‰m˜E 7¨?Ñ#;Ó<ˆð
   !˜Hñ    ˆŒØ     Ô    Ø     ŒØ     Œà  ™VˆÔäm‰m˜E 7¨?Ñ#;Ó<ˆð
   !˜Hñ    ˆŒØ     Ô    Ø     ŒØ     Œà  ™VˆÔà!%×!1Ñ!1°D×4DÑ4DÑ!DˆÔØ×&Ñ&Ó(ˆ ÷U 3ñ 3ú÷8ñ8ûôò %Ø $— ð %ú÷    %ñ    %úsZ¥HÁ GÁ HÁ)AG)Â)GÂ?G)ÇG    ÇHÇG&    Ç!G)Ç)G=Ç9HÇ<G=Ç=HÈH
có—y)Nz tzwinlocal()rBrGs rr‘ztzwinlocal.__repr__Bs€Ør(có2—dt|j«zS)Nztzwinlocal(%s))rrUrGs rÚ__str__ztzwinlocal.__str__Es€à¤$ t§~¡~Ó"6Ñ6Ð6r(có—|jdfS)NrB)r“rGs rr”ztzwinlocal.__reduce__Is€Ø—‘ Ð#Ð#r(N)r<r=r>r?r'r‘r¦r”rBr(rr    r    s„ñò ,)ò\ò7ó$r(r    cóؗtj||d||«}|j||j«z
dzdz¬«}||dz
tzz}|j|k7r    |tz}|S)z> dayofweek == 0 means Sunday, whichweek 5 means last instance rr )Úday)rˆÚreplaceÚ
isoweekdayÚONEWEEKÚmonth)    rjr­Ú    dayofweekÚhourÚminuteÚ    whichweekÚfirstÚ
weekdayoneÚwds             rrfrfMsq€ä × Ñ ˜d E¨1¨d°FÓ ;€Eð—‘ Y°×1AÑ1AÓ1CÑ%CÀqÑ$HÈAÑ#MÓN€JØ    ˜     A™ ¬Ñ0Ñ    1€BØ
‰EÒØ
Œg‰ ˆà €Ir(có¦—i}tj|«d}d}t|«D]¦}tj||«\}}}|tjk(s|tj
k(r |dzrZ|dz
}nT|tj k(rA|jd«r|xs
t«}|j|«}|jd«}|||<Œ¨|S)z0Convert a registry key's values to a dictionary.rNllz@tzresú) rr[rZÚ    EnumValueÚ    REG_DWORDÚREG_DWORD_LITTLE_ENDIANÚREG_SZr5r
r;Úrstrip)ÚkeyÚdoutÚsizeÚtz_resr^Úkey_nameÚvalueÚdtypes        rr…r…[sÐ€à €DÜ × Ñ ˜sÓ # AÑ &€DØ €Fä 4‹[òˆÜ!'×!1Ñ!1°#°qÓ!9ш%˜Ø ”F×$Ñ$Ò $¨´×1OÑ1OÒ(Oð˜Ò Ø Ñ)‘Ø ”f—m‘mÒ #à×Ñ Ô)ØÒ*¤5£7Ø×/Ñ/°Ó6à—L‘L Ó(ˆEàˆˆXŠðð" €Kr()r?rˆr†Ú    six.movesrÚsixrrrr8Ú ImportErrorÚ_commonrÚ__all__r‰r¬rrr rrÚobjectr
rDrr    rfr…rBr(rú<module>rÉs¾ðñóÛ åÝð=ÛÝõ
!â
*ۈ
ˆ(×
˜QÓ
€àH€ ØE€ ØH€òñ ‹O€    ôJ&ˆFôJ&ôZJ& ôJ&ôZ6/ˆIô6/ôrG$ôG$òT óøðQ
ò=á
Ð;Ó
<Ð<ð=ús ˜
BÂB