Re: [Python-Dev] [Python-checkins] cpython: Refined time test in test_logging.

28 Apr
2011
28 Apr
'11
11:22 p.m.
Hi,
http://hg.python.org/cpython/rev/5185e1d91f3d user: Vinay Sajip vinay_sajip@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
4347
Age (days ago)
4347
Last active (days ago)
0 comments
1 participants
participants (1)
-
Éric Araujo