import pytz
from datetime import datetime


def eventIsNow(event):
  """Checks if an event object is happening right now.

  Args:
    event: Object with 'start' and 'end' datetimes or dates.

  Returns:
    Whether the event is now.
  """
  if 'start' not in event or 'end' not in event:
    return False

  # Since Google returns all datetimes with the timezone of the calendar,
  # and we're assuming this server is running in the same timezone,
  # equalize all the timezones for time comparison.
  start = event['start'].replace(tzinfo=pytz.utc)
  end = event['end'].replace(tzinfo=pytz.utc)

  return start <= datetime.now().replace(tzinfo=pytz.utc) <= end