from datetime import datetime
import logging


def get_now_time(format="%Y-%m-%d %H:%M:%S", show=False):
    """
    Gets current time.
    """
    now = datetime.now()
    now = now.strftime(format)
    
    if show == True:
        logging.info("Current time: {}".format(now))
    
    return now