Skip to content
Back to top
View this page
Edit this page

# Time Zone

final class searx.plugins.time_zone.SXNGPlugin(plg_cfg: PluginCfg)

  Plugin to display the current time at different timezones (usually the query city).

  id: str = 'time_zone'

    The ID (suffix) in the HTML form.

  keywords: list[str] = ['time', 'timezone', 'now', 'clock', 'timezones']

    Keywords in the search query that activate the plugin. The keyword is the first word in a search query. If a plugin should be executed regardless of the search query, the list of keywords should be empty (which is also the default in the base class for Plugins).

  post_search(request: SXNG_Request, search: SearchWithPlugins) → EngineResults

    The plugin uses the `searx.weather.GeoLocation` class, which is already implemented in the context of weather forecasts, to determine the time zone. The `searx.weather.DateTime` class is used for the localized display of date and time.