[Python-Dev] [Python-checkins] cpython: Refined time test in test_logging. (original) (raw)

Éric Araujo merwok at netwok.org
Thu Apr 28 16:22:46 CEST 2011


Hi,

http://hg.python.org/cpython/rev/5185e1d91f3d user: Vinay Sajip <vinaysajip at yahoo.co.uk> summary: Refined time test in testlogging.

+ZERO = datetime.timedelta(0) + +class UTC(datetime.tzinfo): + def utcoffset(self, dt): + return ZERO + + dst = utcoffset + + def tzname(self, dt): + return 'UTC' + +utc = UTC()

Any reason not to use datetime.datetime.utc here?

Regards



More information about the Python-Dev mailing list