#NEWLINE# def test_parsedate3( ) : #NEWLINE# #INDENT# td = api . API ( 'APIKEY' ) #NEWLINE# dt = td . _parsedate ( 'Sun Jun 26 17:39:18 -0400 2011' , '%a %b %d %H:%M:%S %z %Y' ) #NEWLINE# assert ( dt . year == 2011 ) #NEWLINE# assert ( dt . month == 6 ) #NEWLINE# assert ( dt . day == 26 ) #NEWLINE# assert ( dt . hour == 17 ) #NEWLINE# assert ( dt . minute == 39 ) #NEWLINE# assert ( dt . second == 18 ) #NEWLINE# offset = dt . utcoffset ( ) #NEWLINE# total_seconds = ( ( ( offset . seconds + ( ( offset . days * 24 ) * 3600 ) ) * ( 10 ** 6 ) ) / ( 10 ** 6 ) ) #NEWLINE# assert ( total_seconds == ( ( - 4 ) * 3600 ) )