CasperSecurity

Current Path : /lib/python3/dist-packages/twisted/python/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/twisted/python/__pycache__/_tzhelper.cpython-310.pyc

o

�b8�@sNdZddlmZmZmZddlmZddgZ	Gdd�de�Z
e
�ddd�ZdS)	z
Time zone utilities.
�)�datetime�	timedelta�tzinfo)�Optional�FixedOffsetTimeZone�UTCc	@s�eZdZdZddedeeddfdd�Zeded	e	d
e	ddfdd��Z
ed
eddfdd��Zdee
defdd�Zdee
defdd�Zdee
defdd�ZdS)ra*
    Represents a fixed timezone offset (without daylight saving time).

    @ivar name: A L{str} giving the name of this timezone; the name just
        includes how much time this offset represents.

    @ivar offset: A L{TimeDelta} giving the amount of time this timezone is
        offset.
    N�offset�name�returncCs||_||_dS)z�
        Construct a L{FixedOffsetTimeZone} with a fixed offset.

        @param offset: a delta representing the offset from UTC.
        @param name: A name to be given for this timezone.
        N)rr	)�selfrr	�r�:/usr/lib/python3/dist-packages/twisted/python/_tzhelper.py�__init__s
zFixedOffsetTimeZone.__init__�sign�hours�minutescCsLd|||f}|dkr|}|}n|dkrtd|����|t||d�|�S)a

        Construct a L{FixedOffsetTimeZone} from an offset described by sign
        ('+' or '-'), hours, and minutes.

        @note: For protocol compatibility with AMP, this method never uses 'Z'

        @param sign: A string describing the positive or negative-ness of the
            offset.
        @param hours: The number of hours in the offset.
        @param minutes: The number of minutes in the offset

        @return: A time zone with the given offset, and a name describing the
            offset.
        z%s%02i:%02i�-�+zInvalid sign for timezone )rr)�
ValueError�	TimeDelta)�clsrrrr	rrr
�fromSignHoursMinutes'sz(FixedOffsetTimeZone.fromSignHoursMinutes�	timeStampcCst�|�t�|�}||�S)z�
        Create a time zone with a fixed offset corresponding to a time stamp in
        the system's locally configured time zone.
        )�DateTime�
fromtimestamp�utcfromtimestamp)rrrrrr
�fromLocalTimeStampAs�z&FixedOffsetTimeZone.fromLocalTimeStamp�dtcCs|jS)z>
        Return the given timezone's offset from UTC.
        )r�rrrrr
�	utcoffsetLszFixedOffsetTimeZone.utcoffsetcCstd�S)zs
        Return a zero L{TimeDelta} for the daylight saving time
        offset, since there is never one.
        r)rrrrr
�dstRszFixedOffsetTimeZone.dstcCs&|jdur|jSt�d|�}|�d�S)z;
        Return a string describing this timezone.
        NrzUTC%z)r	rr�strftimerrrr
�tznameYs

zFixedOffsetTimeZone.tzname)N)�__name__�
__module__�__qualname__�__doc__rr�strr�classmethod�intr�floatrrrr r"rrrr
rs$

����
rN)
r&rrrrr�TZInfo�typingr�__all__rrrrrrr
�<module>s�R
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY