This web page answers 2 simple questions:
- Where is it going to be 4:20 PM next?
- How soon?
Feel free to fork this if you prefer some other hour :)
The standard time zone db needs to be pre-processed in order to easily answer these seemingly simple questions.
For that, you should generate tz.js
by running python mk420tz.py
on the latest csv files (available here).
This should be done each time a time zone goes in or out of daylight saving time (DST). Best is to run this as a daily cron task.
Once in a while, the TZ database changes and you need to load fresh csv files. To be notified when this happens, you can follow @timezonedb on twitter, or use the atom feed.
For your convenience, if you want to start running this right away, tz-example.js
contains some version of tz.js
.
Not necessarily the freshest, but no harm in running a slightly inaccurate version of this ;)
Nomally, you don't have to do this, unless a future version of the timezone db introduces new places,
or you want to change the format of the place names in tz.js
(by tweaking mk420tz.py
).
If you're into it, here's how:
-
Get a flickr API key.
-
Copy
conf-example.py
toconf.py
and edit it. -
Run
python mkflickrplaces.py
. Note that it takes about 15 minutes to run, because it waits 2 seconds between API requests, to avoid flooding the good folks at flickr. -
Edit
flickrplaces.js
and fix the following known bugs"Costa Rica, CR": "/Italy/Lombardy"
should be"/Costa+Rica"
"Malta, MT": "/United+States/Montana/Malta"
should be"/Malta"
- If you find other bugs there, please leave an issue here.
- To Timezonedb for maintaining the data
- To Twitter for Bootstrap
- To Bootswatch for the themes
- To DuckDuckGo, Open Street Map and flickriver for giving us stuff to link to
- To my wife for discovering the need for such an app. This is her birthday present.
Seattle doesn't appear because it isn't on the timezone list :(
Deadlines are either dead or dying. Procrastination is for life.