-
Notifications
You must be signed in to change notification settings - Fork 5
Search
This page describes how @ClockBot handles the searches it receives.
If you call the bot in inline mode without adding any search query, your country timezones are returned using your current locale to get them.
If a search query is present, timezones are searched and returned in the following order:
- First, if there is a zone with the exact code name that you inserted (eg. "Europe/Madrid"), it is added to the results.
- Then, if there is a country with the code of your query (eg. "es", "us", "de"), all the timezones of the country are added.
- Next, an inexact search is performed in the following fields:
- The zone code name (eg. "Europe/Madrid").
- The zone locations and names translated to your language and on the English version (eg. "EspaΓ±a (Madrid)", "Hora de Europa Central", "CEST", "British Summer Time")
The following search parameters allow you to have more fine-grained control on how a search is performed. But they come at the expense of making slower searches (they may take more time to return results, so please be patient).
They can be freely added to a search query separated by spaces from other parameters or basic query string.
To use them, you must specify its name followed by a colon (:
) and the value of the parameter.
Examples: "los angeles country:us", "country:es lang:en", "time:13:04 indiana".
If there is more than one paramater specified on a query (or a parameter and a basic search query) and they produce different result sets, they are combined and only those results included in all parameters and basic search query are returned to you.
This parameter allows you to change the language that is used for the query. It affects the language in which the search query is processed and the language in which the results are returned. It must be an IETF language tag (eg. "en", "es", "es-ES", "en-GB").
This parameter filters the current search to only those timezones included in the specified country. The country must be specified as a 2-letter country-code (eg. "us", "es", "gb").
The value of this parameter is used to perform an inexact search on the current time on all timezones (eg. "10:23:19") in the current language default format.
The value of this parameter is used to perform an inexact search in the GMT offset of a timezone (eg. "GMT +01:00", "+01").
The value of this parameter is used to perform an inexact search on the tzname of the timezones (eg. "CEST", "PDT").
By default, your current locale will be used to perform searches on translatable fields and to provide translated results to you.
Your locale is obtained from Telegram, which sends it to us with each request in the form of a locale code (eg. "es-ES", "en-US"). Telegram usually obtains that locale code from your Operating System language (eg. Android, iOS, Ubuntu, Windows) or Telegram Client language. If no locale code is sent with your queries, we use English (ie. "en-US") as default.
That means that the bot will be working in the language of your Operating System or Telegram Client. To change that, you should change that language so that Telegram sends us another locale code.
Note that others will see the results you send using this bot on the language they were presented to you. So, if you have your Operating System language set to a different language than the language you usually chat in Telegram, that might annoy you (or them).
For queries, you can use the lang parameter to change the language of a query.
An inexact search on a field will match if any of the following conditions is true:
- the query matches exactly the field (highest priority)
- the query starts with the field
- the query is contained in the field or every individual word in the query is contained in the field (lowest priority)
The result from all inexact searches performed for a query are returned sorted by the priority described above, and in the order they were added for results with the same priority. Finally, duplicates are removed.