From 0081b9dc2819ac3988942a6b367b12d92384e79a Mon Sep 17 00:00:00 2001 From: Rodrigo Caldas <75918726+c4ldas@users.noreply.github.com> Date: Mon, 17 Jun 2024 21:00:44 +0100 Subject: [PATCH] Update time.md --- docs/chatbot/variables/time.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/chatbot/variables/time.md b/docs/chatbot/variables/time.md index b5d3644..f59ab9e 100644 --- a/docs/chatbot/variables/time.md +++ b/docs/chatbot/variables/time.md @@ -13,7 +13,7 @@ Displays the time in the given timezone. A list can be found here [Timezones](ht #### Parameters -This variable accepts a timezone as input. If no timezone is provided the variable will error. +This variable accepts a timezone as input. If no timezone is provided the variable will return UTC time. In case timezone is unknown, the variable will error. #### Example Input @@ -39,16 +39,24 @@ Displays a countdown until an inputted UTC timestamp. #### Parameters -This variable accepts a timezone as input. If no timezone is provided the variable will error. +This variable accepts a timezone as input in format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). If no timezone is provided, the variable returns UTC time. In the format is wrong, the variable will error. #### Example Input ``` next stream in ${time.until 19:00} +next stream in ${time.until 2024-06-20T19:00:00-03:00} ``` #### Example Output ``` next stream in 7 hours 59 mins +next stream in 1 day 11 hours +``` + +#### Example Error + +``` +parsing time "19:00:00-03:00" as "2006-01-02T15:04:05Z07:00": cannot parse "19:00:00-03:00" as "2006" ```