def s3_format_datetime(dt=None, dtfmt=None):
 if (not dt):
  dt = datetime.datetime.utcnow()
 if (dtfmt is None):
  dtfmt = ISOFORMAT
 return dt.strftime(dtfmt)

def s3_format_datetime ( dt = None , dtfmt = None ) : if ( not dt ) : dt = datetime . datetime . utcnow ( ) if ( dtfmt is None ) : dtfmt = ISOFORMAT return dt . strftime ( dtfmt )
format a datetime object according to the given format .