#NEWLINE# def write( self , w , value ) : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# w . put_byte ( 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . tzinfo : #NEWLINE# #INDENT# if ( not w . session . use_tz ) : #NEWLINE# #INDENT# raise DataError ( 'Timezone-aware datetime is used without specifying use_tz' ) #NEWLINE# #UNINDENT# value = value . astimezone ( w . session . use_tz ) . replace ( tzinfo = None ) #NEWLINE# #UNINDENT# w . put_byte ( self . _size ) #NEWLINE# self . _write_time ( w , value , self . _prec )