$timezone

This function sets the timezone used by subsequent date and time functions within your command. Think of it as changing the "local time" for your bot's calculations.

Important: This function only affects date and time calculations after it's called within the command's logic.

To find a valid timezone name, refer to the comprehensive list on Wikipediaopen in new window. Use the values from the "TZ database name" column.

Usage: $timezone[Region/City]

Replace Region/City with the desired timezone. For example, Europe/Zurich or America/Los_Angeles.

Example:

This example demonstrates how $timezone changes the output of the $hour function.

Member06/01/2026
!!exec UTC $hour after Change $timezone[Europe/Zurich] Europe/Zurich $hour
Custom Command Bot 06/01/2026
UTC 10 after Change Europe/Zurich 12

In this example:

  • First, $hour is called without a specified timezone, so it returns the hour in UTC (Coordinated Universal Time).
  • Then, $timezone[Europe/Zurich] sets the timezone to Zurich.
  • Finally, $hour is called again, now returning the hour in the Europe/Zurich timezone, which is UTC+2 (or UTC+1 during standard time).
Function difficulty: Easy