-í
›KX;c       sS   d  Z  d k Td Z d „  Z d „  Z d „  Z d „  Z e d j o e ƒ  n d S(	   sÖ   A timegm() emulation for platforms that do not provide the C lib
    API.

    This is the prototype I used to code the timegm() C emulation in
    mxDateTime. It offers a little more than is really needed...

    Copyright (c) 2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
    Copyright (c) 2000-2001, eGenix.com Software GmbH; mailto:info@egenix.com
    See the documentation for further information on copyrights,
    or contact the author. All Rights Reserved.

(   s   *i    c  	  sÿ   t  o" d Gt |  ƒ GHd Gt |  ƒ GHn t |  ƒ \	 } } } } } }	 } } } t |  ƒ \	 } } } } } } } } } | | j oM | d | d | }
 | d | d | } |
 | j  o
 d } n d } n d } | | | d | | d	 |	 | Sd  S(
   Ns   local:s   GMT:i'  id   i€®þÿi€Q i    i  i<   (   s   _debugs	   localtimes   tickss   gmtimes	   localyears
   localmonths   localdays	   localhours   localminutes   localseconds	   localwdays	   localydays   localdsts   gmyears   gmmonths   gmdays   gmhours   gmminutes   gmseconds   gmwdays   gmydays   gmdsts	   localdates   gmdates   offset(   s   tickss   gmwdays   gmseconds   gmminutes   localminutes   gmdays   gmdsts   gmmonths   offsets   localseconds	   localdates
   localmonths	   localwdays   localdsts	   localhours   gmdates   gmydays	   localydays   gmhours   gmyears   localdays	   localyear(    (    s<   /mit/seven/lib/python2.2/site-packages/mx/DateTime/timegm.pys   local_offset s    ''

c	  
  sœ   y6 t  |  | | | | | | | d ƒ	 }	 |	 t
 |	 ƒ SWn_ t j
 oS t  |  | | d d d | | d ƒ	 }	 t
 |	 ƒ }
 |	 |
 d | d | | Sn Xd  S(   Niÿÿÿÿi    i  i<   (   s   mktimes   years   months   days   hours   minutes   seconds   wdays   ydays   tickss   local_offsets   OverflowErrors   offset(   s   years   months   days   hours   minutes   seconds   wdays   ydays   dsts   tickss   offset(    (    s<   /mit/seven/lib/python2.2/site-packages/mx/DateTime/timegm.pys   timegm* s    $$c    sž   t  |  ƒ } xY d d d d f D]E } y t  |  | ƒ } Wn t j
 o
 q n X| | j o Pn q Wt o! d G| Gd G| Gd G| Gd GHn | | j Sd  S(	   Ni *|ÿi€–˜ i€GÆþi€¸9s   given:s
   reference:s   (checkpoint:s   )(   s   local_offsets   tickss   offsets
   checkpoints	   references   OverflowErrors   _debug(   s   tickss
   checkpoints	   references   offset(    (    s<   /mit/seven/lib/python2.2/site-packages/mx/DateTime/timegm.pys   dst9 s     	!c     s  d } d } xá d oÙ t t t | ƒ ƒ } | | j o1 d Gt | ƒ Gd G| Gd G| | GH| d } n t | ƒ d }  |  d j o |  t | ƒ j o- d G| Gd	 Gt | ƒ Gd
 G|  GH| d } n y | d } Wn t	 j
 o Pn Xq W| o d GHd Sn d | GHd Sd  S(   Nipëà6i    i   s   Ooops:s   t =s   diff =iÿÿÿÿs
   Ooops: t =s   dst() =s   isdst =i'  s   Works.s   Got %i warnings.(
   s   ts   oopss   applys   timegms   gmtimes   xs	   localtimes   isdsts   dsts   OverflowError(   s   isdsts   ts   xs   oops(    (    s<   /mit/seven/lib/python2.2/site-packages/mx/DateTime/timegm.pys   _testG s*     # 	s   __main__N(   s   __doc__s   times   _debugs   local_offsets   timegms   dsts   _tests   __name__(   s   local_offsets   _debugs   timegms   dsts   _test(    (    s<   /mit/seven/lib/python2.2/site-packages/mx/DateTime/timegm.pys   ? s   				