Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

jsontime. Nat and I threw this together this morning—it runs on Google App Engine and exposes Python’s pytz timezone library over JSONP.

13 comments

  1. Heh, I posted something similar a little while ago that webifies PHP's apparently-unique-in-all-the-world-yet-crazy-usefu l function strtotime() - http://teczno.com/strtotime.html.

    Michal Migurski - 21st June 2008 20:18 - #

  2. "Stop! jsontime!"

    Time to break out the big poofy pants, eh?

    Eric Meyer - 21st June 2008 21:58 - #

  3. Squeeeee! Useful. Is there a call to enumerate all time zones it supports?

    Jeffrey - 21st June 2008 22:18 - #

  4. Jeffrey: Just added that for you (linked from the homepage).

    Simon Willison - 21st June 2008 23:01 - #

  5. Well if you're taking requests... crossdomain.xml support for we poor sandboxed Flash types would be really nice, especially since actionscript's Date class (like javascript's) lacks exactly this kind of functionality.

    http://json-time.appspot.com/crossdomain.xml is a pretty exciting 404 ;)

    Tom Carden - 22nd June 2008 00:08 - #

  6. Is there a standard convention to expose module's docstrings over JSON? Seems very fitting for a Python-based service.

    Shawn Wheatley - 22nd June 2008 02:12 - #

  7. Tom: added that for you (tell me if I got it wrong).

    Simon Willison - 22nd June 2008 09:54 - #

  8. Have you used any queueing engine to handle DOS attempts (or just general traffic load)?

    Peter Bowyer - 22nd June 2008 19:59 - #

  9. Looks like Google assumes that their infrastructure can handle that:

    http://shell.appspot.com/

    (yes, that's one of their own demos)

    Fredrik - 22nd June 2008 20:39 - #

  10. Peter: I'm assuming that hosting on App Engine means I won't have to worry about that. It's meant to transparently add new load balanced instances of the code to match the load - and since it's shared nothing (there's no usage of the data storage layer at all) it should scale horizontally basically forever. I'll have to keep an eye on it to make sure it doesn't break out of the free quota and start costing me lots of money, but seeing as I can handle five million hits a month without paying a penny I doubt it will ever be a problem.

    Simon Willison - 22nd June 2008 21:38 - #

  11. Simon: excellent - the pain of setting up a queue has held me back from setting up a couple of useful services :) App Engine here I come!

    Peter Bowyer - 23rd June 2008 09:26 - #

  12. Good idea to work around Issue 498, but I fail to see how this is useful if it only gives you the current time.

    Could you add a datetime and a utcdatetime parameter, so that we can convert times in the past and in the future to and from UTC?

    Stefano J. Attardi - 29th June 2008 16:12 - #

  13. would be useful to be able to get just the timezones and their respective offsets (all or specific)

    Ofer - 8th August 2008 19:06 - #

Sign in with OpenID

Auto-HTML: Line breaks are preserved; URLs will be converted in to links.

Manual XHTML: Enter your own, valid XHTML. Allowed tags are a, p, blockquote, ul, ol, li, dl, dt, dd, em, strong, dfn, code, q, samp, kbd, var, cite, abbr, acronym, sub, sup, br, pre

A django site