a
QbQ
@ sL d dl mZ d dlmZmZ d dlmZ G dd deZdd Zdd Z d
S ) )division) timedeltatzinfo)deepcopyc @ s@ e Zd ZdZdd Zdd Zdd Zdd Zd
d Zdd
Z dS )FixedOffseta
Represent a timezone with a fixed offset from UTC and no adjustment for
DST.
>>> FixedOffset(4,0)
>>> FixedOffset(-4,0)
>>> FixedOffset(4,30)
>>> tz = FixedOffset(-5,0)
>>> tz.dst(None)
datetime.timedelta(0)
The class tries to do the right thing with the sign
of the time zone offset:
>>> FixedOffset(-9,30)
>>> FixedOffset(-9,-30)
Traceback (most recent call last):
...
ValueError: minutes must not be negative
Offsets must thus be normalized so that the minute value is positive:
>>> FixedOffset(-8,30)
c C sP t | |dk rtd|dk r*|d9 }t||d| _dtt| j | _dS )zK
Create a new FixedOffset instance with the given offset.
r zminutes must not be negative)hoursminutesZUTCN)r __init__
ValueErrorr _FixedOffset__offsettimezonetimedelta_seconds_FixedOffset__name)selfr r r 3/usr/lib/python3.9/site-packages/pyrfc3339/utils.pyr
( s
zFixedOffset.__init__c C s t dS )zG
Return offset for DST. Always returns timedelta(0).
r )r r Zdtr r r dst6 s zFixedOffset.dstc C s | j S )z*
Return offset from UTC.
)r r r r r utcoffset= s zFixedOffset.utcoffsetc C s | j S )z+
Return name of timezone.
)r r r r r tznameD s zFixedOffset.tznamec C s d | d S )Nz<{0}>)formatr )r r r r __repr__K s zFixedOffset.__repr__c C sF | j }||}||t| <