Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.6 KB

File metadata and controls

37 lines (25 loc) · 1.6 KB

$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 Wikipedia. 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.

!!exec UTC $hour after Change $timezone[Europe/Zurich] Europe/Zurich $hour 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: