HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
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