> ## Documentation Index
> Fetch the complete documentation index at: https://fossabot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# $(time)

Returns the current time in a specified timezone. Shares this behavior with `$(currenttime)`.

#### Parameters

This variable takes **one** *required* parameter that is a **valid [Time Zone Database](https://www.iana.org/time-zones) name**, and **one** *optional* parameter that is a **string of tokens** specifying the output format, which defaults to `hh:mm:ss A (z)` if not provided.

> ***A list of all existing timezones can be found [here](https://wikipedia.org/wiki/List_of_tz_database_time_zones#List), and a list of all available tokens can be found [here](https://momentjs.com/docs/#/displaying/format/).***

#### Example Output

* `$(time Europe/London)`

  ```
  09:14:13 PM (GMT)
  ```

* `$(time America/Los_Angeles LLLL)`

  ```
  Tuesday, January 18, 2022 1:14 PM 
  ```

* `$(time Australia/Sydney YYYY/MM/DD hh:mm:ss)`

  ```
  2022/01/19 08:14:13 
  ```

#### Error Output

* In case no timezone is provided, returns the following:

  ```
  [Error: No timezone provided.]
  ```

* In case no valid timezone is provided, returns the following:

  ```
  [Error: Invalid timezone.]
  ```


## Related topics

- [Getting Started](/docs/getting-started.md)
- [Creating Commands](/docs/commands/custom-commands.md)
- [$(countdown)](/docs/variables/countdown.md)
- [$(countup)](/docs/variables/countup.md)
- [$(count)](/docs/variables/count.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.