~ubuntu-branches/ubuntu/precise/txaws/precise-201203281240

« back to all changes in this revision

Viewing changes to txaws/server/schema.py

  • Committer: Clint Byrum
  • Date: 2012-01-06 00:49:47 UTC
  • Revision ID: clint@ubuntu.com-20120106004947-0wxq4r0ggn8evms2
d/patches/drop-pytz.patch: Removes pytz dependency and
switches to dateutil. (LP: #912589)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from datetime import datetime
2
2
from operator import itemgetter
3
3
 
4
 
from pytz import UTC
 
4
from dateutil.tz import tzutc
5
5
 
6
6
from zope.datetime import parse, SyntaxError
7
7
 
234
234
 
235
235
    def parse(self, value):
236
236
        try:
237
 
            return datetime(*parse(value, local=False)[:6], tzinfo=UTC)
 
237
            return datetime(*parse(value, local=False)[:6], tzinfo=tzutc())
238
238
        except (TypeError, SyntaxError):
239
239
            raise ValueError()
240
240