import time


def datetimestr(format="%Y%m%d_%H%M%S"):
    """
    Date and time string, formatted according to specifier.

    :param format:  keyword argument that specifies how
                    date time string should be formatted
    :return: formatted date time string
    """
    now = time.gmtime()
    return time.strftime(format, now)