Zirak / SO-ChatBot

Other
124 stars 62 forks source link

Time command #80

Open mainerror opened 11 years ago

mainerror commented 11 years ago

This should be a low priority feature.

I think it could be useful to have a !!time [location|ISO 8601 time zone designators] command.

Here's how it would work:


Footnotes

  1. Obviously that requires an appropriate API, if you know of an API that provides the described functionality please post a link.
  2. This does not necessarily require an API, one could fetch the UTC time and return it ± the offset.
Shmiddty commented 11 years ago

Seems somewhat useful, sure.

ralt commented 11 years ago

:+1:

https://developers.google.com/maps/documentation/timezone/

Zirak commented 11 years ago

The problem is finding a decent API. Things like @Ralt show require (lat,lng) which are quite not what we're looking for, and the scarce few who do search by city cost monies (I'm a freeloader).

If this ever moves to node though whistles nervously, we'll have a tz database (/usr/share/zoneinfo), which is at least something.

caub commented 11 years ago

with google reverse geo mapping? !!time Honolulu

FirstWhack commented 11 years ago

Why would we need to use an API? Just using TimeZones should be enough. No one needs to search by city. Then it's just a simple timestamp changed per timezone.

caub commented 11 years ago

the more cool thing would be to query it for user, !!time Zirak and have a result of its timezoned time, based on an algorithm that checks its active hours :)

mainerror commented 11 years ago

@Jhawins Simple example. Without looking it up, what timezone is Tokyo or Mumbai in? See?

@cx11 Maybe in a later iteration, the important functionality would be to get it per city.

Zirak commented 11 years ago

Does this look good enough?