def floor_to_utc_day(value):
 return value.astimezone(pytz.utc).replace(hour=0, minute=0, second=0, microsecond=0)

def floor_to_utc_day ( value ) : return value . astimezone ( pytz . utc ) . replace ( hour = 0 , minute = 0 , second = 0 , microsecond = 0 )
floors a given datetime to utc midnight .