def set_location(self, time, latitude, longitude):
if isinstance(time, datetime.datetime):<EOL><INDENT>tzinfo = time.tzinfo<EOL><DEDENT>else:<EOL><INDENT>tzinfo = time.tz<EOL><DEDENT>if tzinfo is None:<EOL><INDENT>self.location = Location(latitude, longitude)<EOL><DEDENT>else:<EOL><INDENT>self.location = Location(latitude, longitude, tz=tzinfo)<EOL><DEDENT>
Sets the location for the query.

Parameters
----------
time: datetime or DatetimeIndex
    Time range of the query.