public
Description: Google App Engine project returns the UTC and localized datetime object as JSON for a given datetime and timezone.
Homepage: http://json-dsttime.appspot.com
Clone URL: git://github.com/themattharris/json-dsttime.git
themattharris (author)
Mon Sep 21 15:14:09 -0700 2009
commit  185e549e3cf4bc4199d56515c56348e4792a1b0a
tree    71ce9211316b7e90c02a1acb24db32f895a0d1a3
parent  6f4eddce844bf02040c84042d91425aa32fa748d
name age message
file MIT-LICENSE Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
file app.yaml Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
directory dateutil/ Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
file index.yaml Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
file json_dsttime.py Mon Sep 21 15:04:42 -0700 2009 Added home timezone settings [themattharris]
directory pytz/ Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
file readme.textile Mon Sep 21 15:14:09 -0700 2009 Olson not Orson [themattharris]
directory simplejson/ Mon Sep 21 13:29:12 -0700 2009 Google App Engine version [themattharris]
readme.textile

JSON DST Time

Google App Engine project returns the UTC and localized datetime object as JSON for a given datetime and timezone. The response includes whether the timezone was observing daylight savings on the date queried.

Idea spawned from Simon Willison’s json-time http://github.com/simonw/json-time/

Arguments

tz the Olson recognised timezone. e.g. EDT or Europe/London. Case is important!
dt the datestring to be processed

Examples

  1. query http://json-dsttime.appspot.com to get the current datetime in utc
  2. query http://json-dsttime.appspot.com?to_tz=Europe/London to get the current datetime in the Europe/London timezone
  3. query http://json-dsttime.appspot.com?to_tz=Europe/London&dt=2009-09-21T10:00 to get the localized datetime for Europe/London at 10am on 21 September 2009
  4. query http://json-dsttime.appspot.com?to_tz=Europe/London&from_tz=US/Pacific&dt=10:00 to find out what time 10am today in US/Pacific is in Europe

General Notes

This is alpha 1 thrown together in a couple of hours to learn how App Engine works. There’s probably a couple of things which could go wrong that I haven’t trapped for yet. If you find any add them to the issues page and i’ll fix them up.

License

Copyright © 2009 Matt Harris (http://themattharris.com)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.