a ‚oeQ ã@sLddlmZddlmZmZddlmZGdd„deƒZdd„Zdd „Z d S) é)Údivision)Ú timedeltaÚtzinfo)Údeepcopyc@s@eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „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) cCsPt |¡|dkrtdƒ‚|dkr*|d9}t||d�|_dtt|jƒƒ|_dS)zK Create a new FixedOffset instance with the given offset. rzminutes must not be negativeéÿÿÿÿ)ÚhoursÚminutesZUTCN)rÚ__init__Ú ValueErrorrÚ_FixedOffset__offsetÚtimezoneÚtimedelta_secondsÚ_FixedOffset__name)Úselfrr ©rú0C:\Program Files\Certbot\pkgs\pyrfc3339\utils.pyr (s ÿzFixedOffset.__init__cCstdƒS)zG Return offset for DST. Always returns timedelta(0). r)r©rZdtrrrÚdst6szFixedOffset.dstcCs|jS)z* Return offset from UTC. )r rrrrÚ utcoffset=szFixedOffset.utcoffsetcCs|jS)z+ Return name of timezone. )rrrrrÚtznameDszFixedOffset.tznamecCsd | d¡¡S)Nz<{0}>)Úformatr)rrrrÚ__repr__KszFixedOffset.__repr__cCsF|j}| |¡}||t|ƒ<|j ¡D]\}}t||t||ƒƒq&|S)N)Ú __class__Ú__new__ÚidÚ__dict__ÚitemsÚsetattrr)rÚmemoÚclsÚresultÚkÚvrrrÚ __deepcopy__Ns   zFixedOffset.__deepcopy__N) Ú__name__Ú __module__Ú __qualname__Ú__doc__r rrrrr$rrrrrs rcCsXztt| ¡ƒƒWStyR|j}|j}|j}tt|d||dƒƒYS0dS)a• Return the offset stored by a :class:`datetime.timedelta` object as an integer number of seconds. Microseconds, if present, are rounded to the nearest second. Delegates to :meth:`timedelta.total_seconds() ` if available. >>> timedelta_seconds(timedelta(hours=1)) 3600 >>> timedelta_seconds(timedelta(hours=-1)) -3600 >>> timedelta_seconds(timedelta(hours=1, minutes=30)) 5400 >>> timedelta_seconds(timedelta(hours=1, minutes=30, ... microseconds=300000)) 5400 >>> timedelta_seconds(timedelta(hours=1, minutes=30, ... microseconds=900000)) 5401 i€Qi@BN)ÚintÚroundZ total_secondsÚAttributeErrorÚdaysÚsecondsÚ microseconds)Ztdr,r-r.rrrrWs rcCsJtt|ƒdƒ\}}tt|ƒdƒ}|dkr0d}nd}d |t|ƒt|ƒ¡S)zä Return a string representing the timezone offset. Remaining seconds are rounded to the nearest minute. >>> timezone(3600) '+01:00' >>> timezone(5400) '+01:30' >>> timezone(-28800) '-08:00' ié<rú+ú-z{0}{1:02d}:{2:02d})ÚdivmodÚabsr*Úfloatrr))rrr-r Úsignrrrr zs r N) Z __future__rZdatetimerrÚcopyrrrr rrrrÚs  P#