
    ]h                        d Z ddlZddlmZmZ  ed      Z G d de      Z e       Zd Z G d de      Z	 eej                   	      Zej                  r eej                   	      ZneZeez
  Z G d
 de      Z e       Zy)zx
This module provides some datetime.tzinfo implementations.

All those classes are taken from the Python documentation.
    N)	timedeltatzinfoc                   (    e Zd ZdZd Zd Zd Zd Zy)Utcz3UTC

    Universal time coordinated time zone.
    c                     t         S )zW
        Return offset from UTC in minutes east of UTC, which is ZERO for UTC.
        ZEROselfdts     T/var/www/core.comfia.cic-ware.com/crm/lib/python3.12/site-packages/isodate/tzinfo.py	utcoffsetzUtc.utcoffset   s	         c                      y)zi
        Return the time zone name corresponding to the datetime object dt,
        as a string.
        UTC r
   s     r   tznamez
Utc.tzname   s    
 r   c                     t         S )zc
        Return the daylight saving time (DST) adjustment, in minutes east
        of UTC.
        r   r
   s     r   dstzUtc.dst!   	    
 r   c                     t         dfS )zW
        When unpickling a Utc object, return the default instance below, UTC.
        r   )_Utcr   s    r   
__reduce__zUtc.__reduce__(   s     Rxr   N)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r      s    
r   r   c                      t         S )z6
    Helper function for unpickling a Utc object.
    )r   r   r   r   r   r   3   s	     Jr   c                   0    e Zd ZdZddZd Zd Zd Zd Zy)	FixedOffsetz
    A class building tzinfo objects for fixed-offset time zones.

    Note that FixedOffset(0, 0, "UTC") or FixedOffset() is a different way to
    build a UTC tzinfo object.
    c                 6    t        ||      | _        || _        y)z
        Initialise an instance with time offset and name.
        The time offset should be positive for time zones east of UTC
        and negate for time zones west of UTC.
        )hoursminutesN)r   _FixedOffset__offset_FixedOffset__name)r   offset_hoursoffset_minutesnames       r   __init__zFixedOffset.__init__B   s     "nMr   c                     | j                   S z;
        Return offset from UTC in minutes of UTC.
        )r%   r
   s     r   r   zFixedOffset.utcoffsetK   s     }}r   c                     | j                   S zi
        Return the time zone name corresponding to the datetime object dt, as a
        string.
        r&   r
   s     r   r   zFixedOffset.tznameQ   s    
 {{r   c                     t         S )zc
        Return the daylight saving time (DST) adjustment, in minutes east of
        UTC.
        r   r
   s     r   r   zFixedOffset.dstX   r   r   c                      d| j                   z  S )z6
        Return nicely formatted repr string.
        z<FixedOffset %r>r/   r   s    r   __repr__zFixedOffset.__repr___   s     "DKK//r   N)r   r   r   )	r   r   r   r   r*   r   r   r   r2   r   r   r   r!   r!   :   s     0r   r!   )secondsc                   (    e Zd ZdZd Zd Zd Zd Zy)LocalTimezonez>
    A class capturing the platform's idea of local time.
    c                 <    | j                  |      rt        S t        S r,   )_isdst	DSTOFFSET	STDOFFSETr
   s     r   r   zLocalTimezone.utcoffsetx   s     ;;r?r   c                 <    | j                  |      rt        S t        S )z0
        Return daylight saving offset.
        )r7   DSTDIFFr	   r
   s     r   r   zLocalTimezone.dst   s     ;;r?NKr   c                 F    t         j                  | j                  |         S r.   )timer   r7   r
   s     r   r   zLocalTimezone.tzname   s    
 {{4;;r?++r   c           	         |j                   |j                  |j                  |j                  |j                  |j
                  |j                         ddf	}t        j                  |      }t        j                  |      }|j                  dkD  S )zM
        Returns true if DST is active for given datetime object dt.
        r   )yearmonthdayhourminutesecondweekdayr=   mktime	localtimetm_isdst)r   r   ttstamps       r   r7   zLocalTimezone._isdst   so    
 GGHHFFGGIIIIJJL

 B^^E"{{Qr   N)r   r   r   r   r   r   r   r7   r   r   r   r5   r5   s   s    ,r   r5   )r   r=   datetimer   r   r	   r   r   r   r!   timezoner9   daylightaltzoner8   r;   r5   LOCALr   r   r   <module>rQ      s     &|& B 
e)0& )0X t}}n-	 ==4<<-0II
i
/F /f 	r   