getByLocation method

Future<TimezoneResponse> getByLocation(
  1. Location location, {
  2. DateTime? timestamp,
  3. String? language,
})

Retrieves time zone information for the specified location and the timestamp. If the language is specified, the time zone name will be localized to that langauge.

Implementation

Future<TimezoneResponse> getByLocation(
  Location location, {
  DateTime? timestamp,
  String? language,
}) async {
  final requestUrl = buildUrl(
    location: location,
    timestamp: timestamp,
    language: language,
  );
  return _decode(await doGet(requestUrl, headers: apiHeaders));
}