import time


def createDateTimeString(now=None):
    """Return datetime as string (e.g. for saving results)."""
    if now is None:
        now = time.localtime()
    return str(now.tm_year) + str(now.tm_mon).zfill(2) + \
        str(now.tm_mday).zfill(2) + '-' + \
        str(now.tm_hour).zfill(2) + '.' + \
        str(now.tm_min).zfill(2)