services module
- geolocaltime.services.convert(client: GeoRapidClient, latitudes: List[float], longitudes: List[float], times: List[str], out: OutputType = OutputType.LOCAL) List[str]
Converts date and time values from UTC to local time or time of day for the specified locations.
- Parameters:
client – The client instance to use for this query.
latitudes – The latitudes representing the locations.
longitudes – The longitudes representing the locations.
times – The UTC times for each location in ISO 8601 format.
out – The output for the timestamps e.g. “local” means local time or “dtc” means date-time-classification.
- Returns:
A list of date and time values for each location.
- geolocaltime.services.enrich(client: GeoRapidClient, latitudes: List[float], longitudes: List[float], out: OutputType = OutputType.LOCAL) List[str]
Enriches locations using date and time values of the corresponding standard time zones. The local date and time value for each location are determined at the time of execution.
- Parameters:
client – The client instance to use for this query.
latitudes – The latitudes representing the locations.
longitudes – The longitudes representing the locations.
out – The output for the timestamps e.g. “local” means local time or “dtc” means date-time-classification.
- Returns:
A list of date and time values for each location.
- geolocaltime.services.time_of_day(client: GeoRapidClient, latitudes: List[float], longitudes: List[float], times: List[str]) List[str]
Classifies local time values to time of day values like „last night“, „morning“, „noon“, „afternoon“, „evening“ and „night“. The classifier uses seasonal locations of the sun and moon providing realistic classifications.
- Parameters:
client – The client instance to use for this query.
latitudes – The latitudes representing the locations.
longitudes – The longitudes representing the locations.
times – The UTC times for each location in ISO 8601 format.
- Returns:
A list of time of day values for each location.