Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/pytz/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/pytz/__init__.pyo
�
U�Yc@s�dZdZdZeZeZddddddd	d
ddd
dgZddlZddlZddlZ	ddl
Z
ddlmZddlm
Z
ddlmZddlmZddlmZmZmZddlmZddlmZmZyeWn ek
r$eZd�Zn
Xd�Ze	jd�p@dZeje	j �rbed Znd�Z!d�Z"iZ#d�Z$d�Z%ej&d �Z'ej&d!d"�Z(d#ej)fd$��YZ*e*�Z*Z+d%�Z,e-e,_.d&�Z/e-e/_.d'efd(��YZ0e0�Z1d)efd*��YZ2e2�Z3d+ej)fd,��YZ4id-�Z5e-e5_.d.�Z6e7d/kr�e6�ngZ8xge	j9e�D]V\Z:Z;Z<x-dAD]%Z=e=e;kr�e;e;j>e=�=q�q�We8j?d2�e<D��q�Wed3�e8D��Z8ee8�Z@geAe	jBjCed4��D]2ZDeDd5kr0eDd d6kr0eDjE�d7^q0ZFeFj?d8d9d:d;d<d=d>d?d#g	�ed@�eFD��ZFeeF�ZGdS(Bs�
datetime.tzinfo timezone definitions generated from the
Olson timezone database:

    ftp://elsie.nci.nih.gov/pub/tz*.tar.gz

See the datetime section of the Python Library Reference for information
on how to use these modules.
t2016js2016.10ttimezonetutctcountry_timezonest
country_namestAmbiguousTimeErrortInvalidTimeErrortNonExistentTimeErrortUnknownTimeZoneErrort
all_timezonestall_timezones_settcommon_timezonestcommon_timezones_seti����N(R(R(R(R(tLazyDicttLazyListtLazySet(t	unpickler(tbuild_tzinfot_byte_stringcCs|jd�|S(s�
        >>> ascii('Hello')
        'Hello'
        >>> ascii('\N{TRADE MARK SIGN}') #doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
            ...
        UnicodeEncodeError: ...
        tASCII(tencode(ts((s1/usr/lib/python2.7/site-packages/pytz/__init__.pytascii.s	
cCs
|jd�S(s
        >>> ascii('Hello')
        'Hello'
        >>> ascii(u'Hello')
        'Hello'
        >>> ascii(u'\N{TRADE MARK SIGN}') #doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
            ...
        UnicodeEncodeError: ...
        R(R(R((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR<stTZDIRs/usr/share/zoneinfocCs�|jd�jd�}xE|D]=}|tjjksItjj|krtd|��qqWtjjt|�}t	|d�S(s�Open a resource from the zoneinfo subdir for reading.

    Uses the pkg_resources module if available and no standard file
    found at the calculated location.
    t/sBad path segment: %rtrb(
tlstriptsplittostpathtpardirtsept
ValueErrortjoint_tzinfo_dirtopen(tnamet
name_partstparttfilename((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt
open_resourceNs
$cCs1yt|�j�tSWntk
r,tSXdS(s(Return true if the given resource existsN(R(tclosetTruetIOErrortFalse(R$((s1/usr/lib/python2.7/site-packages/pytz/__init__.pytresource_exists]s

cCs�|j�dkrtSyt|�}Wntk
rEt|��nXt|�}|tkr�|tkr�t|�}zt	||�t|<Wd|j
�Xq�t|��nt|S(so Return a datetime.tzinfo implementation for the given timezone

    >>> from datetime import datetime, timedelta
    >>> utc = timezone('UTC')
    >>> eastern = timezone('US/Eastern')
    >>> eastern.zone
    'US/Eastern'
    >>> timezone(unicode('US/Eastern')) is eastern
    True
    >>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
    >>> loc_dt = utc_dt.astimezone(eastern)
    >>> fmt = '%Y-%m-%d %H:%M:%S %Z (%z)'
    >>> loc_dt.strftime(fmt)
    '2002-10-27 01:00:00 EST (-0500)'
    >>> (loc_dt - timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 00:50:00 EST (-0500)'
    >>> eastern.normalize(loc_dt - timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 01:50:00 EDT (-0400)'
    >>> (loc_dt + timedelta(minutes=10)).strftime(fmt)
    '2002-10-27 01:10:00 EST (-0500)'

    Raises UnknownTimeZoneError if passed an unknown zone.

    >>> try:
    ...     timezone('Asia/Shangri-La')
    ... except UnknownTimeZoneError:
    ...     print('Unknown')
    Unknown

    >>> try:
    ...     timezone(unicode('\N{TRADE MARK SIGN}'))
    ... except UnknownTimeZoneError:
    ...     print('Unknown')
    Unknown

    tUTCN(tupperRRtUnicodeEncodeErrorRt
_unmunge_zonet
_tzinfo_cacheR
R(RR)(tzonetfp((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRws%
cCs|jdd�jdd�S(s?Undo the time zone name munging done by older versions of pytz.t_plus_t+t_minus_t-(treplace(R3((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR1�sithoursiR.cBs}eZdZdZeZeZeZd�Zd�Z	d�Z
d�Zd�Ze
d�Ze
d�Zd	�Zd
�ZRS(s�UTC

    Optimized UTC implementation. It unpickles using the single module global
    instance defined beneath this class declaration.
    R.cCs5|jdkr|j|�Sttj|�j|�S(N(ttzinfotNonetlocalizetsuperRt	__class__tfromutc(tselftdt((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR@�s
cCstS(N(tZERO(RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt	utcoffset�scCsdS(NR.((RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyttzname�scCstS(N(RC(RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pytdst�scCs
tdfS(N((t_UTC(RA((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt
__reduce__�scCs.|jdk	rtd��n|jd|�S(s Convert naive time to local times*Not naive datetime (tzinfo is already set)R;N(R;R<R R9(RARBtis_dst((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR=�scCs>|j|kr|S|jdkr1td��n|j|�S(s6Correct the timezone information on the given datetimesNaive time - no tzinfo setN(R;R<R t
astimezone(RARBRI((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt	normalize�s
cCsdS(Ns<UTC>((RA((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt__repr__�scCsdS(NR.((RA((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt__str__�s(t__name__t
__module__t__doc__R3RCt
_utcoffsett_dstt_tznameR@RDRERFRHR,R=RKRLRM(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR.�s						cCstS(s*Factory function for utc unpickling.

    Makes sure that unpickling a utc instance always returns the same
    module global.

    These examples belong in the UTC class above, but it is obscured; or in
    the README.txt, but we are not depending on Python 2.4 so integrating
    the README.txt examples with the unit tests is not trivial.

    >>> import datetime, pickle
    >>> dt = datetime.datetime(2005, 3, 1, 14, 13, 21, tzinfo=utc)
    >>> naive = dt.replace(tzinfo=None)
    >>> p = pickle.dumps(dt, 1)
    >>> naive_p = pickle.dumps(naive, 1)
    >>> len(p) - len(naive_p)
    17
    >>> new = pickle.loads(p)
    >>> new == dt
    True
    >>> new is dt
    False
    >>> new.tzinfo is dt.tzinfo
    True
    >>> utc is UTC is timezone('UTC')
    True
    >>> utc is timezone('GMT')
    False
    (R(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRG�scGs
t|�S(s�Factory function for unpickling pytz tzinfo instances.

    Just a wrapper around tzinfo.unpickler to save a few bytes in each pickle
    by shortening the path.
    (R(targs((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt_pst_CountryTimezoneDictcBs eZdZd�Zd�ZRS(s�Map ISO 3166 country code to a list of timezone names commonly used
    in that country.

    iso3166_code is the two letter code used to identify the country.

    >>> def print_list(list_of_strings):
    ...     'We use a helper so doctests work under Python 2.3 -> 3.x'
    ...     for s in list_of_strings:
    ...         print(s)

    >>> print_list(country_timezones['nz'])
    Pacific/Auckland
    Pacific/Chatham
    >>> print_list(country_timezones['ch'])
    Europe/Zurich
    >>> print_list(country_timezones['CH'])
    Europe/Zurich
    >>> print_list(country_timezones[unicode('ch')])
    Europe/Zurich
    >>> print_list(country_timezones['XXX'])
    Traceback (most recent call last):
    ...
    KeyError: 'XXX'

    Previously, this information was exposed as a function rather than a
    dictionary. This is still supported::

    >>> print_list(country_timezones('nz'))
    Pacific/Auckland
    Pacific/Chatham
    cCs||S(sBackwards compatibility.((RAtiso3166_code((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt__call__=scCs�i}td�}z�x�|D]�}|jd�}|jd�rFqn|jdd�d \}}}|tkrwqny||j|�Wqtk
r�|g||<qXqW||_Wd|j	�XdS(Nszone.tabsUTF-8t#ii(
R(tdecodet
startswithRR<R
tappendtKeyErrortdataR)(RAR^tzone_tabtlinetcodetcoordinatesR3((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt_fillAs 


(RNRORPRXRc(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRVs	t_CountryNameDictcBseZdZd�ZRS(sgDictionary proving ISO3166 code -> English name.

    >>> print(country_names['au'])
    Australia
    cCs�i}td�}zpx`|j�D]R}|jd�}|jd�rLq"n|jdd�\}}|j�||<q"W||_Wd|j�XdS(Nsiso3166.tabsUTF-8RYi(	R(t	readlinesRZR[RR<tstripR^R)(RAR^R_R`RaR$((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRc]s
(RNRORPRc(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRdWst_FixedOffsetcBs\eZdZd�Zd�Zd�Zd�Zd�Zd�Z	e
d�Ze
d�ZRS(	cCsFt|�dkr$td|��n||_tjd|�|_dS(Ni�sabsolute offset is too largetminutes(tabsR t_minutestdatetimet	timedeltat_offset(RARh((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt__init__ts	cCs|jS(N(Rm(RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRDzscCst|jffS(N(tFixedOffsetRj(RA((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRH}scCstS(N(RC(RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRF�scCsdS(N(R<(RARB((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRE�scCsd|jS(Nspytz.FixedOffset(%d)(Rj(RA((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRL�scCs.|jdk	rtd��n|jd|�S(s Convert naive time to local times*Not naive datetime (tzinfo is already set)R;N(R;R<R R9(RARBRI((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyR=�scCs>|j|kr|S|jdkr1td��n|j|�S(s6Correct the timezone information on the given datetimesNaive time - no tzinfo setN(R;R<R RJ(RARBRI((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRK�s
N(
RNROR<R3RnRDRHRFRERLR,R=RK(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRgps						cCsJ|dkrtS|j|�}|dkrF|j|t|��}n|S(s�return a fixed-offset timezone based off a number of minutes.

        >>> one = FixedOffset(-330)
        >>> one
        pytz.FixedOffset(-330)
        >>> one.utcoffset(datetime.datetime.now())
        datetime.timedelta(-1, 66600)
        >>> one.dst(datetime.datetime.now())
        datetime.timedelta(0)

        >>> two = FixedOffset(1380)
        >>> two
        pytz.FixedOffset(1380)
        >>> two.utcoffset(datetime.datetime.now())
        datetime.timedelta(0, 82800)
        >>> two.dst(datetime.datetime.now())
        datetime.timedelta(0)

    The datetime.timedelta must be between the range of -1 and 1 day,
    non-inclusive.

        >>> FixedOffset(1440)
        Traceback (most recent call last):
        ...
        ValueError: ('absolute offset is too large', 1440)

        >>> FixedOffset(-1440)
        Traceback (most recent call last):
        ...
        ValueError: ('absolute offset is too large', -1440)

    An offset of 0 is special-cased to return UTC.

        >>> FixedOffset(0) is UTC
        True

    There should always be only one instance of a FixedOffset per timedelta.
    This should be true for multiple creation calls.

        >>> FixedOffset(-330) is one
        True
        >>> FixedOffset(1380) is two
        True

    It should also be true for pickling.

        >>> import pickle
        >>> pickle.loads(pickle.dumps(one)) is one
        True
        >>> pickle.loads(pickle.dumps(two)) is two
        True
    iN(R.tgetR<t
setdefaultRg(toffsett_tzinfostinfo((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyRo�s5cCsSddl}ddl}ddl}|jjd|j�ddl}|j|�S(Ni����i(tdoctestRtsysRtinsertRtpytzttestmod(RuRRvRx((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt_test�s$t__main__tposixtrightccsV|]L}|dkr|dkrd|krtjjt|�tt�dVqdS(tREADMEtTheoryt.iN(RRR!troottlenR"(t.0ttz_file((s1/usr/lib/python2.7/site-packages/pytz/__init__.pys	<genexpr>�sccs!|]}t|�r|VqdS(N(R-(R�ttz((s1/usr/lib/python2.7/site-packages/pytz/__init__.pys	<genexpr>�sszone.tabtRYitGMTs	US/Alaskas
US/Arizonas
US/Centrals
US/Easterns	US/HawaiisUS/Mountains
US/Pacificccs!|]}|tkr|VqdS(N(R	(R�R�((s1/usr/lib/python2.7/site-packages/pytz/__init__.pys	<genexpr>s(sposixR}(HRPt
OLSON_VERSIONtVERSIONt__version__t
OLSEN_VERSIONt__all__RvRktos.pathRtgettexttpytz.exceptionsRRRRt	pytz.lazyR
RRtpytz.tzinfoRtpytz.tzfileRRtunicodet	NameErrortstrRtgetenvR"tendswithRR(R-R2RR1RlRCtHOURR;R.RRGR*t__safe_for_unpickling__RURVRRdRRgRoRzRNR	twalkR�tdirstfilestexcludetindextextendR
R#RR!tlRRR(((s1/usr/lib/python2.7/site-packages/pytz/__init__.pyt<module>	s�0

	

			<	2
				7		(B		

2


Spamworldpro Mini