Timebot monitors new messages posted to the channels you’ve invited it to. When it sees something that looks like a time (like “3pm”, “9:30”, “4pm”, or “18:00”), it:
- Assumes that represents a time in the local timezone of the message’s sender.
- If “am/pm” is missing, and it’s not a 24-hour time, it assumes that times between “8:00” and “11:59” are “am” times, and times from “12:00” to “7:59” are “pm” times. This lines up with anecdotal experience in my work Slack.
- It then lists the time zones for everyone else in the channel, and calculates the current offset between their local time zone and the sender’s time zone.
- Those offsets are used to translate the time for others in the channel.
It’s not exactly obvious in Slack how to do this. So:
- Go to https://my.slack.com/apps/manage/custom-integrations and click “Build” in the upper right corner
- Then click on “Make a Custom Integration”
- And then select Bots
It’s giving a response that includes a time zone we didn’t expect, or the response doesn’t include a time zone we did expect.
- Be sure that everyone in the channel has set the correct time zone in their Slack profile.
- Channel membership information is cached for an hour. If someone in a new time zone just joined (or left) a channel, timebot thus might not notice for an hour. Restarting timebot will clear that cache.
Remember that timebot caches user info, including time zones, for 4 hours. If people are adjusting their time zones frequently (eg. when you first set up timebot), try restarting timebot to clear the cache.
Strictly speaking, no. The bot uses Slack’s real time messaging API, which is built on websockets, so your server doesn’t need to be publicly accessible.
(But if you run it on a laptop, the bot will go offline every time the laptop closes.)
No, not currently.
See the tests.