#NEWLINE# @ staticmethod #NEWLINE# def interpret_datestring( val ) : #NEWLINE# #INDENT# if ( val [ ( - 5 ) ] in ( '+' , '-' ) ) : #NEWLINE# #INDENT# offset = ( ( ( int ( val [ ( - 4 ) : ( - 2 ) ] ) * 3600 ) + ( int ( val [ ( - 2 ) : ] ) * 60 ) ) * int ( ( offset [ ( - 5 ) ] + '1' ) ) ) #NEWLINE# val = val [ : ( - 5 ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# offset = ( - time . timezone ) #NEWLINE# #UNINDENT# for tformat in cql_timestamp_formats : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# tval = time . strptime ( val , tformat ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# return ( ( calendar . timegm ( tval ) + offset ) * 1000.0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( "can't interpret %r as a date" % ( val , ) ) )