Hubs-Foundation / hubs-discord-bot

A Discord bot that helps you use Hubs together with people in Discord.
Mozilla Public License 2.0
50 stars 31 forks source link

Use moment for timezone stuff, fix scheduling #46

Closed mqp closed 5 years ago

mqp commented 5 years ago

The Javascript standard library literally has no way to do math on non-local timezones, so if we want to get e.g. the "spam the thing at local midnight" scheduling correct we need a separate package. We already take a dependency on moment-timezone for the purposes of node-schedule so it's a natural choice here. It also greatly cleans up the "format this in local time" code.