#NEWLINE# def convertDatetime( t ) : #NEWLINE# #INDENT# '\n    Converts the specified datetime object into its appropriate protocol\n    value. This is the number of milliseconds from the epoch.\n    ' #NEWLINE# epoch = datetime . datetime . utcfromtimestamp ( 0 ) #NEWLINE# delta = ( millis - epoch ) #NEWLINE# millis = ( delta . total_seconds ( ) * 1000 ) #NEWLINE# return int ( millis )