def get_time(format='timestamp', time_=None):
 time_ = int((time_ or time.time()))
 format = format.lower()
 if ('epoch' in format):
  return time_
 timetuple = time.localtime(time_)
 parts = []
 for (i, match) in enumerate('year month day hour min sec'.split()):
  if (match in format):
   parts.append(('%.2d' % timetuple[i]))
 if (not parts):
  return format_time(timetuple, daysep='-')
 elif (len(parts) == 1):
  return parts[0]
 else:
  return parts

def get_time ( format = 'timestamp' , time_ = None ) : time_ = int ( ( time_ or time . time ( ) ) ) format = format . lower ( ) if ( 'epoch' in format ) : return time_ timetuple = time . localtime ( time_ ) parts = [ ] for ( i , match ) in enumerate ( 'year month day hour min sec' . split ( ) ) : if ( match in format ) : parts . append ( ( '%.2d' % timetuple [ i ] ) ) if ( not parts ) : return format_time ( timetuple , daysep = '-' ) elif ( len ( parts ) == 1 ) : return parts [ 0 ] else : return parts
get the current system time .