def sunrise(self, date=None, local=True, use_elevation=True):
        """Return sunrise time.

        Calculates the time in the morning when the sun is a 0.833 degrees
        below the horizon. This is to account for refraction.

        :param date: The date for which to calculate the sunrise time.
                     If no date is specified then the current date will be used.
        :type date:  :class:`~datetime.date`

        :param local: True  = Time to be returned in location's time zone;
                      False = Time to be returned in UTC.
                      If not specified then the time will be returned in local time
        :type local:  bool

        :param use_elevation: True  = Return times that allow for the location's elevation;
                              False = Return times that don't use elevation.
                              If not specified then times will take elevation into account.
        :type use_elevation:  bool

        :returns: The date and time at which sunrise occurs.
        :rtype: :class:`~datetime.datetime`
        """

        if local and self.timezone is None:
            raise ValueError("Local time requested but Location has no timezone set.")

        if self.astral is None:
            self.astral = Astral()

        if date is None:
            date = datetime.date.today()

        elevation = self.elevation if use_elevation else 0
        sunrise = self.astral.sunrise_utc(date, self.latitude, self.longitude, elevation)

        if local:
            return sunrise.astimezone(self.tz)
        else:
            return sunrise
def sunrise ( self , date = None , local = True , use_elevation = True ) : if local and self . timezone is None : raise ValueError ( "Local time requested but Location has no timezone set." ) if self . astral is None : self . astral = Astral ( ) if date is None : date = datetime . date . today ( ) elevation = self . elevation if use_elevation else 0 sunrise = self . astral . sunrise_utc ( date , self . latitude , self . longitude , elevation ) if local : return sunrise . astimezone ( self . tz ) else : return sunrise
Return sunrise time.

        Calculates the time in the morning when the sun is a 0.833 degrees
        below the horizon. This is to account for refraction.

        :param date: The date for which to calculate the sunrise time.
                     If no date is specified then the current date will be used.
        :type date:  :class:`~datetime.date`

        :param local: True  = Time to be returned in location's time zone;
                      False = Time to be returned in UTC.
                      If not specified then the time will be returned in local time
        :type local:  bool

        :param use_elevation: True  = Return times that allow for the location's elevation;
                              False = Return times that don't use elevation.
                              If not specified then times will take elevation into account.
        :type use_elevation:  bool

        :returns: The date and time at which sunrise occurs.
        :rtype: :class:`~datetime.datetime`