Skip to content

$(time)

Syntax
$(time [timezone])
Arguments
Optional

StreamElements Chatbot offers two time-related variables:

  1. $(time): Displays the current time, optionally in a specified timezone
  2. $(time.until): Counts down to a specified time

These variables allow you to enhance your stream chat with real-time clock displays and event countdowns.

!command add !time It's currently $(time America/New_York) for the streamer
Example chat
ViewerName:!time
partner badgemoderator badgeStreamElements:It's currently 21:34 for the streamer
$(time)
$(time <timezone>)
$(time.<timezone>)

If no timezone is provided, the variable returns the current UTC time. The output is always in 24-hour HH:MM format, e.g. 21:34 or 09:05.

  • <timezone>: (Optional) The desired timezone in IANA format. If omitted, UTC is used. The space form $(time America/New_York) and the dot form $(time.America/New_York) are equivalent.

A list of valid IANA timezones can be found at Nodatime Timezones.

  1. Display time in New York:

    The current time in New York is $(time America/New_York)
  2. Display UTC time:

    The current UTC time is $(time)
$(time.until <when>)
  • <when>: The target time, in one of exactly two accepted formats:
    • A bare 24-hour time, e.g. 19:00. This is interpreted as UTC; if that time has already passed today, it rolls over to the next occurrence.
    • A full RFC 3339 timestamp, e.g. 2026-09-20T19:00:00-03:00.

Any other format will make the variable print a parse error in chat.

The result is a human-readable duration such as 2 hours 30 mins. If the target time is in the past, ago is appended, e.g. 2 hours 30 mins ago.

  1. Countdown to a time of day (UTC):

    Next stream starts in $(time.until 19:00)
  2. Countdown to a specific date and time:

    Upcoming event in $(time.until 2026-09-20T19:00:00-03:00)
  1. Invalid Timezone:

    • Error message: unknown time zone lol
    • Solution: Double-check the timezone name against the Nodatime Timezones list. Ensure you’re using the full IANA name (e.g., “America/Los_Angeles” instead of “PST”).
  2. Invalid Timestamp Format:

    • Error message: parsing time "19:00:00-03:00" as "2006-01-02T15:04:05Z07:00": cannot parse "19:00:00-03:00" as "2006"
    • Solution: Use either a bare 24-hour time (19:00) or a complete RFC 3339 timestamp (2026-09-20T19:00:00-03:00) — nothing in between.

Q: Can I use abbreviations like EST or GMT with $(time)?

A: No, always use full IANA timezone names like “America/New_York” or “Europe/London” to avoid ambiguity and ensure correct time display.

Q: What timezone does $(time.until 19:00) use?

A: Bare times are always interpreted as UTC. To count down to a time in your local timezone, use a full RFC 3339 timestamp with a UTC offset, e.g. 2026-09-20T19:00:00-03:00.