#NEWLINE# def _process_date_text( self , message , load , date_text ) : #NEWLINE# #INDENT# match = self . date_regex . search ( self ) #NEWLINE# if ( match is None ) : #NEWLINE# #INDENT# logger . error ( 'This date text does not match expected pattern: {0}' . format ( date_text ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# hour = int ( match . group ( 'hour' ) ) #NEWLINE# if ( ( match . group ( 'pm' ) . lower ( ) == 'pm' ) and ( hour < 12 ) ) : #NEWLINE# #INDENT# hour += 12 #NEWLINE# #UNINDENT# date = datetime ( int ( match . group ( 'year' ) ) , get_month_as_int ( match . group ( 'month' ) ) , int ( match . group ( 'day' ) ) , hour , int ( match . group ( 'minute' ) ) ) #NEWLINE# return date