Every repository with this icon (
Every repository with this icon (
tree 71ce9211316b7e90c02a1acb24db32f895a0d1a3
parent 6f4eddce844bf02040c84042d91425aa32fa748d
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Mon Sep 21 13:29:12 -0700 2009 | |
| |
app.yaml | Mon Sep 21 13:29:12 -0700 2009 | |
| |
dateutil/ | Mon Sep 21 13:29:12 -0700 2009 | |
| |
index.yaml | Mon Sep 21 13:29:12 -0700 2009 | |
| |
json_dsttime.py | Mon Sep 21 15:04:42 -0700 2009 | |
| |
pytz/ | Mon Sep 21 13:29:12 -0700 2009 | |
| |
readme.textile | Mon Sep 21 15:14:09 -0700 2009 | |
| |
simplejson/ | Mon Sep 21 13:29:12 -0700 2009 |
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
- query
http://json-dsttime.appspot.comto get the current datetime in utc - query
http://json-dsttime.appspot.com?to_tz=Europe/Londonto get the current datetime in the Europe/London timezone - query
http://json-dsttime.appspot.com?to_tz=Europe/London&dt=2009-09-21T10:00to get the localized datetime for Europe/London at 10am on 21 September 2009 - query
http://json-dsttime.appspot.com?to_tz=Europe/London&from_tz=US/Pacific&dt=10:00to 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.







