def ceiling_datetime(d, now=None): if now is None: now = rfc3339.now() if d > now: return now return d
def now_datetime(): return rfc3339.now()