discord-diabetes / diabot-plugins

(preserved for posterity) Diabetes-related plugins for supybot
5 stars 2 forks source link

[BGs] Add time zone correction support #3

Closed TwelveBaud closed 10 years ago

TwelveBaud commented 12 years ago

At present, all times are stored in UTC and displayed in "awaxa Time", aka "Eastern Standard/Daylight Time" or "America/New_York". However, #reddit_diabetes represents a worldwide community. It would make sense to provide the option to display information in the local time zone of the user, rather than awaxa Time.

These considerations are required:

  1. What timezone libraries and timezones are available, and what's required to use them? What level of support should be offered? (pytz is installed on the diabot server right now, for starters.)
  2. Provide a way to explicitly set a Unix time zone for a user (bgs set tz America/Chicago`,bgs set tz Europe/Paris`, etc).
  3. Provide a way to explicitly set a time offset for a user (bgs set tz -0500` for an EST variant that doesn't include EDT, orbgs itis 12:30` when it's 6:30 awaxa Time to be "like" Central European Time, only following US DST rules, or something, I dunno; I don't work here...).
  4. Possibly provide time zone inference (`bgs itis 5:30 AM when it's 6:30 awaxa Time inferring US Central Std/Dlt Time).