[Python-checkins] cpython: Refined time test in test_logging.
É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 <vinay_sajip at yahoo.co.uk>
> summary:
> Refined time test in test_logging.
> +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-checkins
mailing list