/usr/lib/rads/venv/lib/python3.13/site-packages/dateutil/tz/__pycache__
NameSizeModeActions
tz.cpython-313.pyc660940644editdlrm
win.cpython-313.pyc173560644editdlrm
_common.cpython-313.pyc137570644editdlrm
_factories.cpython-313.pyc47240644editdlrm
__init__.cpython-313.pyc7480644editdlrm
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/dateutil/tz/__pycache__/tz.cpython-313.pyc (66094B)
jSrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ r SSK r SSK J r SSK J r SSKJrJr SSKJrJr SS KJr SS KJrJr SS KJr SS KJrJr SS KJr \R<"S5r\R"SSSSS5r \ RC5r"\ RF"\5"SS\RH55r%\%"5r&\ RF"\5"SS\RH55r'"SS\5r("SS\)5r*"SS\)5r+"SS\5r,"SS\5r-\ RF"\5"SS\-55r."SS \)5r/"S!S"\5r0"S#S$\)5r1\RdS%:wa S&S'/r3/S(Qr4O/r3/r4S)r5\5"5r6C5S4S*jr7S4S+jr8S,r9S-r:\RvS.:aS/rr? g!\a S=rrGNuf=f!\a "S2S3\)5r?gf=f)5a This module offers timezone implementations subclassing the abstract :py:class:`datetime.tzinfo` type. There are classes to handle tzfile format files (usually are in :file:`/etc/localtime`, :file:`/usr/share/zoneinfo`, etc), TZ environment string (in all known formats), given ranges (with help from relative deltas), local machine timezone, fixed offset timezone, and UTC timezone. N) OrderedDict) string_types)_thread)tzname_in_python2_tzinfo) tzrangebaseenfold)_validate_fromutc_inputs) _TzSingleton_TzOffsetFactory) _TzStrFactory)tzwin tzwinlocal)warnicx\rSrSrSrSrSr\S5rSr \ S5r Sr S r S rS r\R"rS rg ) tzutc)a This is a tzinfo object that represents the UTC time zone. **Examples:** .. doctest:: >>> from datetime import * >>> from dateutil.tz import * >>> datetime.now() datetime.datetime(2003, 9, 27, 9, 40, 1, 521290) >>> datetime.now(tzutc()) datetime.datetime(2003, 9, 27, 12, 40, 12, 156379, tzinfo=tzutc()) >>> datetime.now(tzutc()).tzname() 'UTC' .. versionchanged:: 2.7.0 ``tzutc()`` is now a singleton, so the result of ``tzutc()`` will always return the same object. .. doctest:: >>> from dateutil.tz import tzutc, UTC >>> tzutc() is tzutc() True >>> tzutc() is UTC True c[$NZEROselfdts A/usr/lib/rads/venv/lib/python3.13/site-packages/dateutil/tz/tz.py utcoffsettzutc.utcoffsetJ c[$rrrs rdst tzutc.dstMrr cg)NUTCrs rtzname tzutc.tznamePsr cg) Whether or not the "wall time" of a given datetime is ambiguous in this zone. :param dt: A :py:class:`datetime.datetime`, naive or time zone aware. :return: Returns ``True`` if ambiguous, ``False`` otherwise. .. versionadded:: 2.6.0 Fr&rs r is_ambiguoustzutc.is_ambiguousTsr cU$)zx Fast track version of fromutc() returns the original ``dt`` object for any valid :py:class:`datetime.datetime` object. r&rs rfromutc tzutc.fromutcds  r c[U[[45(d[$[U[5=(d* [U[5=(a UR[ :H$r) isinstancertzoffsetNotImplemented_offsetrrothers r__eq__ tzutc.__eq__lsH%%!233! !5%(HE8,F$1F Ir Nc X:X+$rr&r5s r__ne__ tzutc.__ne__u ""r c4SURR-$Nz%s() __class____name__rs r__repr__tzutc.__repr__x////r r&)rA __module__ __qualname____firstlineno____doc__rr"rr'r+r r.r7__hash__r:rCobject __reduce____static_attributes__r&r rrr)sb> IH#0""Jr rc~\rSrSrSrSrSrSr\S5r \ S5r Sr S r S rS rS r\R$rS rg )r2a A simple class for representing a fixed offset from UTC. :param name: The timezone name, to be returned when ``tzname()`` is called. :param offset: The time zone offset in seconds, or (since version 2.6.0, represented as a :py:class:`datetime.timedelta` object). cXlUR5n[R "[ U5S9Ulg![[4a N5f=fNseconds)_name total_seconds TypeErrorAttributeErrordatetime timedelta_get_supported_offsetr4)rnameoffsets r__init__tzoffset.__init__sM  ))+F ))2G2OP >*   s;A AcUR$rr4rs rrtzoffset.utcoffsets ||r c[$rrrs rr" tzoffset.dstrr cUR$r)rTrs rr'tzoffset.tznames zzr cXR-$rr`rs rr.tzoffset.fromutcsLL  r cg)z Whether or not the "wall time" of a given datetime is ambiguous in this zone. :param dt: A :py:class:`datetime.datetime`, naive or time zone aware. :return: Returns ``True`` if ambiguous, ``False`` otherwise. .. versionadded:: 2.6.0 Fr&rs rr+tzoffset.is_ambiguoussr cj[U[5(d[$URUR:H$r)r1r2r3r4r5s rr7tzoffset.__eq__s(%**! !||u}},,r Nc X:X+$rr&r5s rr:tzoffset.__ne__r<r cURR<S[UR5<S[ UR R 55<S3$)N(, ))r@rAreprrTintr4rUrBs rrCtzoffset.__repr__s<#~~66#DJJ/"4<<#=#=#?@B Br )rTr4)rArFrGrHrIr]rr"rr'r r.r+r7rJr:rCrKrLrMr&r rr2r2sh Q!! - H#B ""Jr r2c^\rSrSrSrU4SjrSrSr\S5r Sr Sr SS jr S r S rS rS r\R$rSrU=r$)tzlocalzJ A :class:`tzinfo` subclass built around the ``time`` timezone functions. c>[[U] 5 [R"[ R *S9Ul[ R(a)[R"[ R*S9Ul OURUl URUR- Ul [UR5Ul [[ R5UlgrQ)superrvr]rXrYtimetimezone _std_offsetdaylightaltzone _dst_offset _dst_savedbool_hasdsttupler'_tznames)rr@s rr]tzlocal.__init__s gt%'#--t}}nE =='114<<-HD #//D **T-=-==DOO, dkk* r cUcUR(agURU5(a UR$UR$r)r_isdstrr|rs rrtzlocal.utcoffsets5 :$,, ;;r??## ### #r cUcUR(agURU5(aURUR- $[$r)rrrr|rrs rr" tzlocal.dsts9 :$,, ;;r??##d&6&66 6Kr c>URURU5$r)rrrs rr'tzlocal.tznames}}T[[_--r c~URU5nU(+=(a X RXR- 5:g$)r*) _naive_is_dstr)rr naive_dsts rr+tzlocal.is_ambiguouss=&&r*  H00oo1EFF Ir cz[U5n[R"U[R-5R$r)_datetime_to_timestamprz localtimer{tm_isdst)rr timestamps rrtzlocal._naive_is_dsts**2. ~~i$--78AAAr cUR(dgURU5n[USS5nURU5(aUbUR U5(+$gU$)NFfoldT)rrgetattrr+_fold)rr fold_naivedstvalrs rrtzlocal._isdsts^2||##B'r64(   R ::b>)) r c.[U[5(a9URUR:H=(a URUR:H$[U[5(aDUR (+=(a, UR SS;=(a UR[:H$[U[5(aTUR (+=(a< UR SUR:H=(a URUR:H$[$)Nr>GMTr%) r1rvr|rrrrrr2rTr4r3r5s rr7tzlocal.__eq__.s eW % %$$(9(99:$$(9(99 ; u % % $-MM!$6-$$, .x ( ( $6MM!$ 36$$ 5 7" !r Nc X:X+$rr&r5s rr:tzlocal.__ne__?r<r c4SURR-$r>r?rBs rrCtzlocal.__repr__BrEr )rrrr|r)T)rArFrGrHrIr]rr"rr'r+rrr7rJr:rCrKrLrM __classcell__r@s@rrvrvs` +$..I$B&P "H#0""Jr rvcD\rSrSr/SQrSrSrSrSrSr Sr S r S r g) _ttinfoiH)r\deltaisdstabbrisstdisgmt dstoffsetcBURHn[XS5 M gr __slots__setattr)rattrs rr]_ttinfo.__init__LsNND D %#r c/nURH4n[X5nUcMURU<S[U5<35 M6 URR <SSR U5<S3$)N=rorprq)rrappendrrr@rAjoin)rlrvalues rrC_ttinfo.__repr__PsY NNDD'E D$u+67# >>22DIIaLAAr c[U[5(d[$URUR:H=(a URUR:H=(a UR UR :H=(ay UR UR :H=(aY URUR:H=(a9 URUR:H=(a URUR:H$r) r1rr3r\rrrrrrr5s rr7_ttinfo.__eq__Xs%))! ! u||+2 ekk)2 ekk)2 UZZ'2 ekk) 2  ekk) 2 %//1  3r Nc X:X+$rr&r5s rr:_ttinfo.__ne__fr<r cL0nURHn[XS5X'M U$r)rrrstater[s r __getstate___ttinfo.__getstate__is(NND!$d3EK# r cTURHnX!;dM [XX5 M grrrs r __setstate___ttinfo.__setstate__os!NND}EK0#r r&) rArFrGrHrr]rCr7rJr:rrrMr&r rrrHs/0I&B 3H# 1r rc&\rSrSrSr/SQrSrSrg)_tzfileiuzk Lightweight class for holding the relevant transition and time zone information read from binary tzfiles. ) trans_listtrans_list_utc trans_idx ttinfo_list ttinfo_std ttinfo_dst ttinfo_before ttinfo_firstc bURHn[XURUS55 M! gr)attrsrget)rkwargsrs rr]_tzfile.__init__}s%JJD D 4 6 7r r&N)rArFrGrHrIrr]rMr&r rrrus JE8r rc^\rSrSrSrSU4SjjrSrSrSSjrSr S r S r SS jr S r S rSr\S5rSrSrSrSrSrSrSrU=r$)tzfileia, This is a ``tzinfo`` subclass that allows one to use the ``tzfile(5)`` format timezone files to extract current and historical zone information. :param fileobj: This can be an opened file stream or a file name that the time zone information can be read from. :param filename: This is an optional parameter specifying the source of the time zone information in the event that ``fileobj`` is a file object. If omitted and ``fileobj`` is a file stream, this parameter will be set either to ``fileobj``'s ``name`` attribute or to ``repr(fileobj)``. See `Sources for Time Zone and Daylight Saving Time Data `_ for more information. Time zone files can be compiled from the `IANA Time Zone database files `_ with the `zic time zone compiler `_ .. note:: Only construct a ``tzfile`` directly if you have a specific timezone file on disk that you want to read into a Python ``tzinfo`` object. If you want to get a ``tzfile`` representing a specific IANA zone, (e.g. ``'America/New_York'``), you should call :func:`dateutil.tz.gettz` with the zone identifier. **Examples:** Using the US Eastern time zone as an example, we can see that a ``tzfile`` provides time zone information for the standard Daylight Saving offsets: .. testsetup:: tzfile from dateutil.tz import gettz from datetime import datetime .. doctest:: tzfile >>> NYC = gettz('America/New_York') >>> NYC tzfile('/usr/share/zoneinfo/America/New_York') >>> print(datetime(2016, 1, 3, tzinfo=NYC)) # EST 2016-01-03 00:00:00-05:00 >>> print(datetime(2016, 7, 7, tzinfo=NYC)) # EDT 2016-07-07 00:00:00-04:00 The ``tzfile`` structure contains a fully history of the time zone, so historical dates will also have the right offsets. For example, before the adoption of the UTC standards, New York used local solar mean time: .. doctest:: tzfile >>> print(datetime(1901, 4, 12, tzinfo=NYC)) # LMT 1901-04-12 00:00:00-04:56 And during World War II, New York was on "Eastern War Time", which was a state of permanent daylight saving time: .. doctest:: tzfile >>> print(datetime(1944, 2, 7, tzinfo=NYC)) # EWT 1944-02-07 00:00:00-04:00 Nc>[[U] 5 Sn[U[5(aXl[ US5nSnO=UbX lO3[US5(aURUlO[U5UlUb@U(d [U5nUnURU5nSSS5 URW5 gg!,(df  N!=f)NFrbTr[) ryrr]r1r _filenameopenhasattrr[rr _nullcontext _read_tzfile _set_tzdata)rfileobjfilenamefile_opened_here file_streamtzobjr@s rr]tzfile.__init__s fd$&  g| , ,$N7D)G#   !%N Wf % %$\\DN!']DN  #&w/K))+6   U # s C Cc d[RHn[USU-[X55 M g)zRURU U-5 M [CUR5Ul[CUR>5Ul[CUR5UlU$s snf)NTZifzmagic not foundz>6lz>%dlz>%dBz>lbbz>%dbrrRr)"rreaddecode ValueErrorstructunpacklistrrrangerseekosSEEK_CURrrZrr\rXrYrrrfindrrrrrrrr enumerater)rrout ttisgmtcnt ttisstdcntleapcnttimecnttypecntcharcntttinfoirrrgmtoffrabbrindttiidxlastdst lastoffset lastdstoffsetlastbaseoffsetr\r baseoffset adjustments rrtzfile._read_tzfilesi <<? ! ! #v -./ / R2 MM%b!1 2/       !%fmmFW4D4;LL4K'M"NC "$C  "MM&7*:*1,,w*?ACMCMwA MM&-- Q@ A ||G$++-  LL1bkk 2 MM&:"5"),,z":?CH#9E!HMCI#9E!HMCI OO " "3 ' :=G#-G   ???%%47OOA4FF!1wqy"b1A--*C>>#))), ^^ ),~~~#...2~~cnn),??C999,/)+ ),(:C%   .FAsZZFI"99"$*Z$7 $$1 $,$6$6y$ICM$-M )+J#J*z^/K W,+ iiGJ'N NN ! !#"4"4Q"7*"D E?/Bcmm, s~~."3#5#56 gHsVcUR(dg[U5nU(a URO URn[R"XC5nUS- $)Nr) _trans_listr_trans_list_utcbisect bisect_right)rrin_utcrrr s r_find_last_transitiontzfile._find_last_transitionsJ*2. .4T))9I9I !!*8Qwr cUbUS-[UR5:a UR$US:a UR$URU$)Nrr)lenr _ttinfo_std_ttinfo_before _trans_idx)rr s r _get_ttinfotzfile._get_ttinfosM ;37s4+;+;'<<## # 7&& &s##r cFURU5nURU5$r)_resolve_ambiguous_timer )rrr s r _find_ttinfotzfile._find_ttinfos#**2.$$r cR[U[R5(d [S5eURULa [ S5eUR USS9nUR U5nU[R"URS9-nURXBS9n[U[U5S9$)a The ``tzfile`` implementation of :py:func:`datetime.tzinfo.fromutc`. :param dt: A :py:class:`datetime.datetime` object. :raises TypeError: Raised if ``dt`` is not a :py:class:`datetime.datetime` object. :raises ValueError: Raised if this is called with a ``dt`` which does not have this ``tzinfo`` attached. :return: Returns a :py:class:`datetime.datetime` object representing the wall time in ``self``'s time zone. z&fromutc() requires a datetime argumentzdt.tzinfo is not selfT)rrR)r r) r1rXrVtzinforrr rYr\r+r rs)rrr r dt_outrs rr.tzfile.fromutcs("h//00DE E 99D 45 5((D(9s#h((<<   1f3t9--r cUcURU5n[U5nURU5nUbUS::agURUS- 5RUR- nURUnX6U-:$)r*rFr)rrr r\r)rrr rr odtts rr+tzfile.is_ambiguous s ;,,R0C+2. s# ;#(   cAg & - - :   c "7""r cURU5nURU5nUbUS:XaU$[U(+=(a URX55nX$- $)Nr)rrrsr+)rrr r idx_offsets rr#tzfile._resolve_ambiguous_time(sX((, 2 ;#(JUAt'8'8'AB r cnUcgUR(d[$URU5R$r)rrr$rrs rrtzfile.utcoffset5s/ :K  $***r cUcgUR(d[$URU5nUR(d[$UR$r) _ttinfo_dstrr$rr)rrr s rr" tzfile.dst>s@ :K#yyK}}r cbUR(aUcgURU5R$r)rr$rrs rr' tzfile.tznameNs)2:  $)))r c[U[5(d[$URUR:H=(a9 URUR:H=(a UR UR :H$r)r1rr3rr _ttinfo_listr5s rr7 tzfile.__eq__Ts^%((! !  E$5$5585#3#338!!U%7%77 9r c X:X+$rr&r5s rr: tzfile.__ne__]r<r cdURR<S[UR5<S3$Nrorq)r@rArrrrBs rrCtzfile.__repr__`s >>22D4HIIr c$URS5$r) __reduce_ex__rBs rrLtzfile.__reduce__cs!!$''r cLURSUR4UR4$r)r@r__dict__)rprotocols rrBtzfile.__reduce_ex__fs t~~ 6 FFr )rrF)rArFrGrHrIr]rrrr r$r.r+r#rr"rr'r7rJr:rCrLrBrMrrs@rrrsEN$0< ^@  $% ".H#:  + ** 9H#J(GGr rcD\rSrSrSrS SjrSrSr\S5r Sr g) tzrangeija The ``tzrange`` object is a time zone specified by a set of offsets and abbreviations, equivalent to the way the ``TZ`` variable can be specified in POSIX-like systems, but using Python delta objects to specify DST start, end and offsets. :param stdabbr: The abbreviation for standard time (e.g. ``'EST'``). :param stdoffset: An integer or :class:`datetime.timedelta` object or equivalent specifying the base offset from UTC. If unspecified, +00:00 is used. :param dstabbr: The abbreviation for DST / "Summer" time (e.g. ``'EDT'``). If specified, with no other DST information, DST is assumed to occur and the default behavior or ``dstoffset``, ``start`` and ``end`` is used. If unspecified and no other DST information is specified, it is assumed that this zone has no DST. If this is unspecified and other DST information is *is* specified, DST occurs in the zone but the time zone abbreviation is left unchanged. :param dstoffset: A an integer or :class:`datetime.timedelta` object or equivalent specifying the UTC offset during DST. If unspecified and any other DST information is specified, it is assumed to be the STD offset +1 hour. :param start: A :class:`relativedelta.relativedelta` object or equivalent specifying the time and time of year that daylight savings time starts. To specify, for example, that DST starts at 2AM on the 2nd Sunday in March, pass: ``relativedelta(hours=2, month=3, day=1, weekday=SU(+2))`` If unspecified and any other DST information is specified, the default value is 2 AM on the first Sunday in April. :param end: A :class:`relativedelta.relativedelta` object or equivalent representing the time and time of year that daylight savings time ends, with the same specification method as in ``start``. One note is that this should point to the first time in the *standard* zone, so if a transition occurs at 2AM in the DST zone and the clocks are set back 1 hour to 1AM, set the ``hours`` parameter to +1. **Examples:** .. testsetup:: tzrange from dateutil.tz import tzrange, tzstr .. doctest:: tzrange >>> tzstr('EST5EDT') == tzrange("EST", -18000, "EDT") True >>> from dateutil.relativedelta import * >>> range1 = tzrange("EST", -18000, "EDT") >>> range2 = tzrange("EST", -18000, "EDT", -14400, ... relativedelta(hours=+2, month=4, day=1, ... weekday=SU(+1)), ... relativedelta(hours=+1, month=10, day=31, ... weekday=SU(-1))) >>> tzstr('EST5EDT') == range1 == range2 True Nc6SSKJq XlX0lUR 5nUR 5nUb[R"US9Ul O [Ul Ub[R"US9Ul O*    >*   s"E-F-FFFFcUR(dg[R"USS5nX R-nX R-nX44$)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. Nr)r]rXrZr[)ryear base_yearrarbs r transitionstzrange.transitionssD{{%%dAq1 ---//)|r c[U[5(d[$URUR:H=(a URUR:H=(ay UR UR :H=(aY UR UR :H=(a9 URUR:H=(a URUR:H$r) r1rJr3rWrXr|rrZr[r5s rr7tzrange.__eq__s%))! !%//14%//14  E$5$554  E$5$554!!U%7%77 4 5#3#33  5r cUR$r)r\rBs r_dst_base_offsettzrange._dst_base_offsets%%%r )rXr\rr[rZrWr|r])NNNNN) rArFrGrHrIr]rgr7propertyrlrMr&r rrJrJjs8IT+/)-!%-.^0 5&&r rJc2\rSrSrSrSSjrS SjrSrSrg) tzstri a> ``tzstr`` objects are time zone objects specified by a time-zone string as it would be passed to a ``TZ`` variable on POSIX-style systems (see the `GNU C Library: TZ Variable`_ for more details). There is one notable exception, which is that POSIX-style time zones use an inverted offset format, so normally ``GMT+3`` would be parsed as an offset 3 hours *behind* GMT. The ``tzstr`` time zone object will parse this as an offset 3 hours *ahead* of GMT. If you would like to maintain the POSIX behavior, pass a ``True`` value to ``posix_offset``. The :class:`tzrange` object provides the same functionality, but is specified using :class:`relativedelta.relativedelta` objects. rather than strings. :param s: A time zone string in ``TZ`` variable format. This can be a :class:`bytes` (2.x: :class:`str`), :class:`str` (2.x: :class:`unicode`) or a stream emitting unicode characters (e.g. :class:`StringIO`). :param posix_offset: Optional. If set to ``True``, interpret strings such as ``GMT+3`` or ``UTC+3`` as being 3 hours *behind* UTC rather than ahead, per the POSIX standard. .. caution:: Prior to version 2.7.0, this function also supported time zones in the format: * ``EST5EDT,4,0,6,7200,10,0,26,7200,3600`` * ``EST5EDT,4,1,0,7200,10,-1,0,7200,3600`` This format is non-standard and has been deprecated; this function will raise a :class:`DeprecatedTZFormatWarning` until support is removed in a future version. .. _`GNU C Library: TZ Variable`: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html c pSSKJq Xl[R U5nUbUR (a [ S5eURS;aU(dU=RS-sl[RXRURURURSSS9 UR(dSUl SUlOPURUR 5Ul UR(aURUR"SS 9Ul[%UR5Ulg) Nr)_parserzunknown string formatrr%rF)rarbr)isend)dateutil.parserrrparser_s_parsetzany_unused_tokensrr^r_rJr]r`rrZr[_deltararbrr])rs posix_offsetress rr]tzstr.__init__7s5ooa  ;#//45 5 ;;. ( MMR M {{CMMcmm$%  1{{ $D "DO $ CII 6D   "&++cggQ+"?4,,- r c.SSKJn 0nURbURUS'URbEURURUR5US'URS:aSUS'O`SUS'OZUR (aUR US'O9UR bUR US'OURbURUS 'U(dDU(dS US'SUS'URS5US'OS US'SUS'URS 5US'URbURUS 'OSUS 'U(a@URUR- nUS ==URURS---ss'UR"S0UD6$)NrrLrQrSrrRrUyearday nlyeardayrrTrrSi iQr&)rVrMrQrSweekrRydayjydayrYrzrr|rSdays)rxrtrMrrs rrz tzstr._deltaWsw* 77 ggF7Oyy$$1$9$9!))QVV$Ly!66A:$%F5M$&F5M !u VV  !F9  WW "#''F; "#w !u $1$4$4R$8y!"$w "u $1$4$4R$8y! 66  !F9 !%F9  $$t'7'77E 9 e1C!C C **4V44r cdURR<S[UR5<S3$r?r@rArrrwrBs rrCtzstr.__repr__>>22DMBBr )r[rwrZr]NrH)r) rArFrGrHrIr]rzrCrMr&r rrprp s(R.@'5RCr rpc \rSrSrSSjrSrg)_tzicalvtzcompiNc[R"US9Ul[R"US9UlURUR- UlX0lX@lXPlgrQ)rXrY tzoffsetfrom tzoffsetto tzoffsetdiffrr'rrule)rrrrr'rs rr]_tzicalvtzcomp.__init__sM$..|D",,Z@ OOd.?.??   r )rrr'rrr)NN)rArFrGrHr]rMr&r rrrs $(r rct^\rSrSr/4U4SjjrSrSrSrSr\ S5r Sr \ Rr S rU=r$) _tzicalvtzic>[[U] 5 XlX l/Ul/Ul[R"5Ul gr) ryrr]_tzid_comps _cachedate _cachecompr allocate_lock _cache_lock)rtzidcompsr@s rr]_tzicalvtz.__init__s9 j$(*  "002r c[UR5S:XaURS$URSS9nUR URUR R XRU545sSSS5 $!,(df  O=f![a Of=fSnSnURH/nURXA5nU(dMU(aX%:dM+UnUnM1 U(d-URHnUR(aMUn O WSnUR UR RSXRU545 URRSU5 [UR 5S:a4UR R5 URR5 SSS5 U$!,(df  U$=f)Nrrr(rT) rrreplacerrrindexrr _find_compdtrinsertpop)rr lastcompdtlastcompcompcompdts r _find_comp_tzicalvtz._find_comps t{{ q ;;q> ! ZZtZ $ !!t'<'<B((*+"!!    KKD&&t0FvzZ-@#     zzz#H$  7    OO " "1r::b>&: ; OO " "1h /4??#b(##%##%  s< B8B= B BBB B%$B%+BG  GcUR[:a$URU5(aX!R-nURR USS9nU$)NT)inc)rrrrbefore)rrrrs rr_tzicalvtz._find_compdtsH   t # 2 ## #B""24"0 r c@UcgURU5R$r)rrrs rr_tzicalvtz.utcoffsets :r"---r cjURU5nUR(a UR$[$r)rrrr)rrrs rr"_tzicalvtz.dsts(r" ::$$ $Kr c8URU5R$r)rr'rs rr'_tzicalvtz.tznamesr")))r c2S[UR5-$)Nz)rrrrBs rrC_tzicalvtz.__repr__s$tzz"222r )rrrrr)rArFrGrHr]rrrr"rr'rCrKrLrMrrs@rrrsF#%3+Z. **3""Jr rc@\rSrSrSrSrSrS SjrSrSr S r S r g) tzicalia? This object is designed to parse an iCalendar-style ``VTIMEZONE`` structure as set out in `RFC 5545`_ Section 4.6.5 into one or more `tzinfo` objects. :param `fileobj`: A file or stream in iCalendar format, which should be UTF-8 encoded with CRLF endings. .. _`RFC 5545`: https://tools.ietf.org/html/rfc5545 c0SSKJq [U[5(aXl[ US5nO&[ US[U55Ul[U5n0Ul UnURUR55 SSS5 g!,(df  g=f)Nr)rrr[) rVrr1rrwrrrrr_vtz _parse_rfcr)rrfobjs rr]tzical.__init__si" g| , ,G7C(GgvtG}=DG"7+G  OODIIK (WWs  B BcH[URR55$)z/ Retrieves the available time zones as a list. )rrkeysrBs rr tzical.keyssDIINN$%%r Nc Ucf[UR5S:Xa [S5e[UR5S:a [S5e[[ UR55nURR U5$)a0 Retrieve a :py:class:`datetime.tzinfo` object by its ``tzid``. :param tzid: If there is exactly one time zone available, omitting ``tzid`` or passing :py:const:`None` value returns it. Otherwise a valid key (which can be retrieved from :func:`keys`) is required. :raises ValueError: Raised if ``tzid`` is not specified but there are either more or fewer than 1 zone defined. :returns: Returns either a :py:class:`datetime.tzinfo` object representing the relevant time zone or :py:const:`None` if the ``tzid`` was not found. rzno timezones definedrz more than one timezone available)rrrnextiterr)rrs rr tzical.getsf$ <499~" !788TYY!# !CDDTYY(Dyy}}T""r cUR5nU(d [S5eUSS;aSUSS:HnUSSnOSn[U5S:Xa&[USS5S -[USS5S --U-$[U5S :Xa5[USS5S -[USS5S --[USS5-U-$[S U-5e) Nz empty offsetr)+-)rrrrrrPi<rzinvalid offset: )striprrrs)rr{signals r _parse_offsettzical._parse_offset"s GGI^, , Q4: adck*F!"AF q6Q;"1J%AabE R76A A Vq["1J%AaF b(883qu:EO O/!34 4r cUR5nU(d [S5eSnU[U5:aVX#R5nU(dX# O)US:aUSS:XaX#S- ==USS- ss'X# OUS- nU[U5:aMVSn/nSnSnUGHnU(dM UR SS5upU R S5n U (d [S5eU SR 5n U SSn U(GaZU S :Xa#U S ;aO[S U -5eU nSn Sn Sn/nSnMU S :XaU S :XaUU(a[SU-5eU(d [S5eU(d [S5e[ XV5URU'SnMX:XaW (d [S5eW c [S5eWc [S5eSnW(a%[RSRU5SSSS9n[XUS:HWU5nURU5 SnGMv[SU -5eU(aU S:Xa5U HnUS:wdM SU-n[U5e WRU5 Sn GMU S;aWRU5 GMU S:Xa2U (a[SU <SU S<S35eURU 5n GMU S:Xa,U (a[S U S-5eURU 5nGMJU S!:XaU (a[S"U S-5eU nGMmU S#:XaGMv[S$U -5eU S%:XaU (a[S&U S-5eU nGMU S';aGM[S$U -5eU S :XdGMU S :XdGMSn/nSnGM g)(Nz empty stringr rF:;zempty property nameBEGIN)STANDARDDAYLIGHTzunknown component: END VTIMEZONEzcomponent not closed: zmandatory TZID not foundz at least one component is neededzmandatory DTSTART not foundz mandatory TZOFFSETFROM not found T) compatibleignoretzcacherzinvalid component end: DTSTARTzVALUE=DATE-TIMEz(Unsupported DTSTART param in VTIMEZONE: )RRULERDATEEXRULEEXDATE TZOFFSETFROMz unsupported z parm: TZOFFSETTOzunsupported TZOFFSETTO parm: TZNAMEzunsupported TZNAME parm: COMMENTzunsupported property: TZIDzunsupported TZID parm: )TZURLz LAST-MODIFIEDr) splitlinesrrrstripsplitupperrrrrrulestrrrrr)rr{linesrlinerrinvtzcomptyper[rparms founddtstartrr rrulelinesr'rrrparmmsgs rrtzical._parse_rfc2s ^, , #e*n8??$DHQ47c>c d12h& HQ#e*nD**S!,KDJJsOE !6778>>#D!"IE7? 88()>u)DEE$H#(L#'L!%J!#J!FU] +#",-Eh-N"OO#",-G"HH$", B#DD+5T*A $ %*+",-J"KK'/", B#DD%-", B#DD"%!& *0E;?9=6:"0"BE!H M#OO'+'9'9%'@ - ", ?a H#JJ%)%7%7%> ) ", ;E!H D#FF!&*()A$)FGGv~ ", 9%( B#DD$!FF()A$)FGGUk%9Mr cdURR<S[UR5<S3$r?rrBs rrCtzical.__repr__rr )rwrr) rArFrGrHrIr]rrrrrCrMr&r rrrs( )"& #65 {zCr rwin32z/etc/localtimer)z/usr/share/zoneinfoz/usr/lib/zoneinfoz/usr/share/lib/zoneinfoz /etc/zoneinfocf^[4m[b T[4- m"U4SjS[5nU"5$)NcP>\rSrSrSrSrS U4SjjrSrSr\ S Sj5r S r g) __get_gettz..GettzFuncia Retrieve a time zone object from a string representation This function is intended to retrieve the :py:class:`tzinfo` subclass that best represents the time zone that would be used if a POSIX `TZ variable`_ were set to the same value. If no argument or an empty string is passed to ``gettz``, local time is returned: .. code-block:: python3 >>> gettz() tzfile('/etc/localtime') This function is also the preferred way to map IANA tz database keys to :class:`tzfile` objects: .. code-block:: python3 >>> gettz('Pacific/Kiritimati') tzfile('/usr/share/zoneinfo/Pacific/Kiritimati') On Windows, the standard is extended to include the Windows-specific zone names provided by the operating system: .. code-block:: python3 >>> gettz('Egypt Standard Time') tzwin('Egypt Standard Time') Passing a GNU ``TZ`` style string time zone specification returns a :class:`tzstr` object: .. code-block:: python3 >>> gettz('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3') tzstr('AEST-10AEDT-11,M10.1.0/2,M4.1.0/3') :param name: A time zone name (IANA, or, on Windows, Windows keys), location of a ``tzfile(5)`` zoneinfo file or ``TZ`` variable style time zone specifier. An empty string, no argument or ``None`` is interpreted as local time. :return: Returns an instance of one of ``dateutil``'s :py:class:`tzinfo` subclasses. .. versionchanged:: 2.7.0 After version 2.7.0, any two calls to ``gettz`` using the same input strings will return the same object: .. code-block:: python3 >>> tz.gettz('America/Chicago') is tz.gettz('America/Chicago') True In addition to improving performance, this ensures that `"same zone" semantics`_ are used for datetimes in the same zone. .. _`TZ variable`: https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html .. _`"same zone" semantics`: https://blog.ganssle.io/articles/2018/02/aware-datetime-arithmetic.html c[R"5UlSUl[ 5Ul[ R"5Ulg)Nr) weakrefWeakValueDictionary_GettzFunc__instances_GettzFunc__strong_cache_sizer_GettzFunc__strong_cacherrrrBs rr]'__get_gettz..GettzFunc.__init__ s6&::UR URRUS5nUc@URUS9nUb#[ UT5(dUbX RU'O UsSSS5 $UR R X5UR U'[UR 5UR:aUR RSS9 SSS5 U$!,(df  W$=f)N)r[Flast) rrrnocacher1rrrrpopitem)rr[rvtzlocal_classess r__call__'__get_gettz..GettzFunc.__call__s!!%%))$5:40B L)"o>>!z24((. "#"!&-1,?,?,C,CD,M##D)t**+d.F.FF''//U/;-"0I1"!0IsAC.A$C C+cUR Xl[UR5U:a4URR SS9 [UR5U:aM4SSS5 g!,(df  g=f)NFr)rrrrr )rsizes rset_cache_size-__get_gettz..GettzFunc.set_cache_size+s\!!+/($--.5''//U/;$--.5"!!s AA** A8cUR [R"5UlURR 5 SSS5 g!,(df  g=fr)rrrrrclearrBs r cache_clear*__get_gettz..GettzFunc.cache_clear1s:!!#*#>#>#@ ##))+"!!s 5A  AcSnU(d[RSnUbUS;a[Hn[RR U5(dVUn[ HHn[RRXC5n[RRU5(dMH O M}[RRU5(dM[U5n U$ [5nU$URS5(aUSSn[RR U5(a6[RRU5(a [U5nU$SnU$[ Hn[RRX@5n[RRU5(d8UR)SS5n[RRU5(dM~[U5n U$ Sn[*b [+U5nU(dS S KJn U"5R5U5nU(dJUHnUS ;dM [7U5n U$ US ;a[8nU$U[:R<;a [5nU$![a GNsf=f![[[4a GMf=f![aCn[!U["5(a(Sn[$R&"[U5U5 SnAGNeSnAff=f![[[4a GMf=f![,[.4a SnGN&f=f![a Nf=f) zA non-cached version of gettzNTZ)rrrz'gettz argument should be str, not bytesrrr)get_zonefile_instance 0123456789rs)renvironKeyErrorTZFILESpathisabsTZPATHSrisfilerIOErrorOSErrorrrv startswithrVr1bytessix raise_fromrr WindowsErrorUnicodeEncodeErrordateutil.zoneinforrrpr%rzr') r[tzfilepathrrenew_msgrcs rr&__get_gettz..GettzFunc.nocache6sB::d+D|ty0 'H77==22#+$+D')ww||D'CH!ww~~h77 %%, %ww~~h//!!'!1B!|IU!( !BtIqs++#ABx77==&&ww~~d++#D\ZIW"VIS!(#%77<<#;!ww~~h77'/'7'7S'AH#%77>>(#;#; (!!'!1B!BIS!(" ,*%*4[ "O!6!8!#9),BI&*T[[%8)0BI[  !(*=! !!!$.."Ky'91== *!(*=! !%12D#E*%)*",6%-(,%-swJ J/J2) L L L8 JJJ/.J/2 K?<7K:9K::K?LLL54L58 MM) __instances__strong_cache__strong_cache_sizerr) rArFrGrHrIr]r rr staticmethodrrM)r sr GettzFuncrs4D J 7 6 <  , S  S r r5)rvrrK)r5r s @r __get_gettzr6s5jOJ=(GFGR ;r cUc$URc [S5eURnURSS9nURUS9R[5RU5nURSS9nX:H$)a Given a datetime and a time zone, determine whether or not a given datetime would fall in a gap. :param dt: A :class:`datetime.datetime` (whose time zone will be ignored if ``tz`` is provided.) :param tz: A :class:`datetime.tzinfo` with support for the ``fold`` attribute. If ``None`` or not provided, the datetime's own time zone will be used. :return: Returns a boolean value whether or not the "wall time" exists in ``tz``. .. versionadded:: 2.7.0 N,Datetime is naive and no time zone provided.r)r(rr astimezoner%)rr+dt_rts rdatetime_existsr;sx& z 99 KL L YY 4 B JJbJ ! , ,S 1 < >> from dateutil import tz >>> from datetime import datetime >>> NYC = tz.gettz('America/New_York') >>> print(tz.resolve_imaginary(datetime(2017, 3, 12, 2, 30, tzinfo=NYC))) 2017-03-12 03:30:00-04:00 >>> KIR = tz.gettz('Pacific/Kiritimati') >>> print(tz.resolve_imaginary(datetime(1995, 1, 1, 12, 30, tzinfo=KIR))) 1995-01-02 12:30:00+14:00 As a note, :func:`datetime.astimezone` is guaranteed to produce a valid, existing datetime, so a round-trip to and from UTC is sufficient to get an extant datetime, however, this generally "falls back" to an earlier time rather than falling forward to the STD side (though no guarantees are made about this behavior). :param dt: A :class:`datetime.datetime` which may or may not exist. :return: Returns an existing :class:`datetime.datetime`. If ``dt`` was not imaginary, the datetime returned is guaranteed to be the same object passed to the function. .. versionadded:: 2.7.0 rrN)r(r;rXrYr)r curr_offset old_offsets rresolve_imaginaryrGsgH yy_R%8%8H..R88CCE 8--B77BBD  J&& Ir cJURSS9[- R5$)z} Convert a :class:`datetime.datetime` object to an epoch timestamp in seconds since January 1, 1970, ignoring the time zone. Nr)rEPOCHrU)rs rrrs# JJdJ #e + : : <rls4 # /(-6%& !$1a+ < Q#HOOQ#!Q#n g#$A#xA#%A#H|#g|#~*1f*1Z 8f 8eGWeGP_&k_&D=!tCGtC"tCnVS#S#lKCVKC\<<7-G G GGNb  D+*\+\=v!6W8EJX8  v  s$G G GGG/.G/