{"id":19858499,"url":"https://github.com/matjam/discotime","last_synced_at":"2026-05-14T04:32:51.167Z","repository":{"id":139866888,"uuid":"261352458","full_name":"matjam/discotime","owner":"matjam","description":"A discord time bot","archived":false,"fork":false,"pushed_at":"2023-02-23T07:36:54.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T14:26:18.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matjam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-05T03:24:53.000Z","updated_at":"2023-02-23T07:36:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"cab800c4-c093-44cc-9319-7384d736aaed","html_url":"https://github.com/matjam/discotime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matjam%2Fdiscotime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matjam%2Fdiscotime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matjam%2Fdiscotime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matjam%2Fdiscotime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matjam","download_url":"https://codeload.github.com/matjam/discotime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241255130,"owners_count":19934815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:23:44.116Z","updated_at":"2026-05-14T04:32:51.123Z","avatar_url":"https://github.com/matjam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discotime\n\nDiscotime is the project that runs `tzbot`, a bot on discord that is intended to help users who schedule events and have attendees from multiple timezones.\n\n## What can the bot do?\n\nRight now, not much. But the planned features as follows:\n\n## First, set a more accurate timezone for yourself\n\nTimezones are complicated by the fact that some timezones change twice a year; for example \"Pacific Standard Time\" or PST changes from UTC-7 to UTC-8 and back again during the summer.\n\nIf you message the bot with the `!set` command you can set a canonical timezone, such as `America/Los_Angeles` as your timezone, and the bot will use that, instead of trying to guess based on your nickname in the channel.\n\nYou can view a list of canonical timezones at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n\n```\n\u003e\u003e\u003e !set America/Los_Angeles\ntzbot: ok, your timezone is now set to America/Los_Angeles.\ntzbot: I will assume this is your local timezone when I convert a time to your local time.\n```\n\n## Automatically guess your timezone based on your channel nickname.\n\nIf for example, you have a nickname in a server with `(-7)` or `[-7]` at the end of your name, `tzbot` will assume that's the time you want to convert to if you have not configured a more precise timezone using `!set`. This will allow you to (inside a channel only) do:\n\n```\n\u003e\u003e\u003e\u003e\u003e\u003e !localtime 5:54pm\ntzbot: That time is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\ntzbot: Local time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\n```\n\nThis allows people who have yet to set a timezone but have it in their nickname to take advantage of the bot.\n\n## Convert time from one timezone to another.\n\nFor example\n\n```\n\u003e\u003e\u003e\u003e\u003e\u003e !localtime 5:36pm in America/Los_Angeles\ntzbot: That time is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\ntzbot: Local time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\n```\n\nThis will assume the time given is in UTC, and convert to America/Los_Angeles time (currently -0700 but outside of summer time it is -0800).\n\nYou can use timezone abbreviations:\n\n```\n\u003e\u003e\u003e\u003e\u003e\u003e !localtime 5:36pm in PDT\ntzbot: That time is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\ntzbot: Local time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\n```\n\nYou can find a list of supported abbreviations here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n\nPlease note that these abbreviations have limitations. PST could mean \"Pacific Standard Time\" or \"Philippines Standard Time\", so I recommend you use the ones that are more specific.\n\nYou can use offsets:\n\n```\n\u003e\u003e\u003e\u003e\u003e\u003e !localtime 5:36pm in -0700\ntzbot: That time is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\ntzbot: Local time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\n```\n\nYou can also convert from one timezone to another\n\n```\n\u003e\u003e\u003e\u003e\u003e\u003e !convert 8:54am PST to UTC\ntzbot: That time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\ntzbot: Which is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\n```\n\nIf you want to remove ambiguity, then use the canonical timezone names from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\n\n```\n\u003e\u003e\u003e !convert 10:36am America/Los_Angeles to UTC\ntzbot: That time is 8:54am on Tuesday, 05 May 2020 PDT (UTC-0700)\ntzbot: Which is 3:54pm on Tuesday, 05 May 2020 UTC (UTC+0000)\n```\n\n## Remind me\n\nYou can ask the bot to private message you at a specific time in UTC. If you give it no offset or timzeone it will use the configured timezone that you set earlier, and failing that it will try to use guess based on your in-server nickname:\n\n```\n\u003e\u003e\u003e !remindme 2020-05-06 23:30\ntzbot: That time is 11:30pm on Wednesday, 06 May 2020 UTC (UTC+0000)\ntzbot: I will remind you at 4:30pm on Wednesday, 06 May 2020 PDT (UTC-0700)\n```\n\nif the bot cannot infer your timezone, will will error.\n\nYou can also provide a timezone to the bot when asking for a reminder, in which case it will do the necessary conversion from the one given to the one you are in:\n\n```\n\u003e\u003e\u003e\u003e\u003e !remindme tomorrow at 11:30pm +0800\ntzbot: That time is 11:30pm on Wednesday, 06 May 2020 +0800 (UTC+0800)\ntzbit: I will remind you at 8:30am on Wednesday, 06 May 2020 PDT (UTC-0700)\n```\n\n## Natural Language Dates\n\nI really tried to support natural language dates, but none of the go libraries were really up to the task.\n\nSo, instead, I am using https://github.com/araddon/dateparse which has a list of formats that it supports. Which is a lot. Many may not give you what you're looking for; so you just have to find one that works for you.\n\nMy personal recommendation, is to use the `2013-04-01 22:43` format. It's completely unambiguous and pretty much everyone understands it. But you can potentially use any of the formats on the dateparse page.\n\n# Adding the bot to your Discord server\n\nIf you want this bot in your Discord server, please click [here](https://discord.com/api/oauth2/authorize?client_id=707063041547829279\u0026permissions=388160\u0026scope=bot).\n\nNote that the bot is under active development.\n\n# About hosting and data storage, privacy, etc\n\nThe bot is hosted in Heroku under a free tier account, with a redis database for persistant storage of timezone settings. You can see exactly the code that is pushed to Heroku, here in the repository. Note that I do log messages that the bot recieves for debugging purposes - this is all messages prefixed with a `!` - however Heroku [only keeps 1500 of the latest log messages](https://devcenter.heroku.com/articles/logging#log-history-limits) and given that I only log stuff interesting to the bot (potential commands) it's unlikely I'm going to see anything interesting. If I did, I have better things to do with my time than snoop people's private conversations.\n\n# Contributing\n\nIf you want to help develop the bot, or extend it's capabilities, PRs are gratefully requested. If you don't have any coding ability, then feel free to create suggestions in Github's issue tracker for this project.\n\n# License\n\n```\nMIT License\n\nCopyright (c) 2020 Nathan Ollerenshaw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatjam%2Fdiscotime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatjam%2Fdiscotime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatjam%2Fdiscotime/lists"}