mò ›KX;c@sSdZdkTdZd„Zd„Zd„Zd„Zedjo eƒndS( 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. (t*ic Csûto"dGt|ƒGHdGt|ƒGHnt|ƒ\ }}}}} }}}}t|ƒ\ }}}} } }} }} ||joM|d|d|}|d|d|}||jo d}q×d}nd}||| d| | d ||S( Nslocal:sGMT:i'idi€®þÿi€Qiii<(t_debugt localtimettickstgmtimet localyeart localmonthtlocaldayt localhourt localminutet localsecondt localwdayt localydaytlocaldsttgmyeartgmmonthtgmdaytgmhourtgmminutetgmsecondtgmwdaytgmydaytgmdstt localdatetgmdatetoffset(RRRRRRR RRRRRR RRRR R RRR R((t=/data/zmath/lib/python2.4/site-packages/mx/DateTime/timegm.pyt local_offsets''    c Csœy6t||||||||dƒ } | t | ƒSWn_t j oSt|||ddd||dƒ } t | ƒ} | | d|d||SnXdS(Niÿÿÿÿiii<( tmktimetyeartmonthtdaythourtminutetsecondtwdaytydayRRt OverflowErrorR( RRRR R!R"R#R$tdstRR((Rttimegm*s$$ cCsŽt|ƒ}xMd D]E}yt||ƒ}Wntj o qnX||joPqqWto!dG|GdG|GdG|GdGHn||jS( Ni*|ÿi€–˜i€GÆþi€¸9sgiven:s reference:s (checkpoint:t)(i*|ÿi€–˜i€GÆþi€¸9(RRRt checkpointt referenceR%R(RR*R)R((RR&9s   !cCsd}d}xÚttt|ƒƒ}||jo1dGt|ƒGdG|GdG||GH|d}nt|ƒd}|djo@|t|ƒjo-dG|Gd Gt|ƒGd G|GH|d}ny|d }Wqt j oPqXqW|p d GHdSnd |GHdSdS(Nipëà6iisOoops:st =sdiff =iÿÿÿÿs Ooops: t =sdst() =sisdst =i'sWorks.sGot %i warnings.( tttoopstapplyR'RtxRtisdstR&R%(R/R+R.R,((Rt_testGs* #   t__main__N(t__doc__ttimeRRR'R&R0t__name__(RR'R&RR0((Rt? s