-í
›KX;c       sq     d  Z    d k T d Z  d „  Z * d „  Z 9 d „  Z G 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 |  ƒ GH d Gt |  ƒ GHn  t |  ƒ \	 } } } } } }	 } } }  t |  ƒ \	 } } } } } } } } }  | | j o\  | 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´   * , y< - t  |  | | | | | | | d ƒ	 }	 . |	 t
 |	 ƒ SWnk / t j
 o\ 2 t  |  | | d d d | | d ƒ	 }	 3 t
 |	 ƒ }
 4 |	 |
 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Å   9 ; t  |  ƒ } < xn d d d d f D< ]W } = y > t  |  | ƒ } Wn ? t j
 o @ q( n XA | | j o B Pn q( WC t o$ D d G| Gd G| Gd G| Gd GHn E | | 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     sX  G I d } J d } K xK d oý L t t t | ƒ ƒ } M | | j o7 N d Gt | ƒ Gd G| Gd G| | GHO | d } n P t | ƒ d }  Q |  d j o |  t | ƒ j o3 R d G| Gd	 Gt | ƒ Gd
 G|  GHS | d } n T y U | d } Wn V t	 j
 o W Pn Xq WX | o Y d GHZ d Sn \ d | GH] d 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   
	