
    Pi                         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dS )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dS )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     b/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/isodate/tzinfo.py	utcoffsetzUtc.utcoffset   s	         c                     dS )zi
        Return the time zone name corresponding to the datetime object dt,
        as a string.
        UTC r
   s     r   tznamez
Utc.tzname   s	    
 ur   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      sZ         
          r   r   c                      t           S )z6
    Helper function for unpickling a Utc object.
    )r   r   r   r   r   r   3   s	     Jr   c                   2    e Zd ZdZd
dZd Zd Zd Zd Zd	S )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.
    r   r   c                 @    t          ||          | _        || _        dS )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M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     "DK//r   N)r   r   r   )	r   r   r   r   r*   r   r   r   r2   r   r   r   r!   r!   :   sn                  0 0 0 0 0r   r!   )secondsc                   *    e Zd ZdZd Zd Zd Zd ZdS )LocalTimezonez>
    A class capturing the platform's idea of local time.
    c                 H    |                      |          rt          S t          S r,   )_isdst	DSTOFFSET	STDOFFSETr
   s     r   r   zLocalTimezone.utcoffsetx   s"     ;;r?? 	r   c                 H    |                      |          rt          S t          S )z0
        Return daylight saving offset.
        )r7   DSTDIFFr	   r
   s     r   r   zLocalTimezone.dst   s      ;;r?? 	NKr   c                 L    t           j        |                     |                   S r.   )timer   r7   r
   s     r   r   zLocalTimezone.tzname   s    
 {4;;r??++r   c           	          |j         |j        |j        |j        |j        |j        |                                ddf	}t          j        |          }t          j	        |          }|j
        dk    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   sd    
 GHFGIIJJLL

 B^E""{Qr   N)r   r   r   r   r   r   r   r7   r   r   r   r5   r5   s   sZ             , , ,    r   r5   )r   r=   datetimer   r   r	   r   r   r   r!   timezoner9   daylightaltzoner8   r;   r5   LOCALr   r   r   <module>rQ      s8     & & & & & & & &y||    &   B 
cee  )0 )0 )0 )0 )0& )0 )0 )0X It}n---	 = 	4<-000III
i
/ / / / /F / / /f 	r   