mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
parsedate_tz(): Minor cleanup.
Port from Python 2.3/email 2.5: Add a test for the tm_yday field is 1 in the return of parsedate().
This commit is contained in:
parent
5a49fae1ab
commit
602426e3cf
2 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
# Copyright (C) 2002-2004 Python Software Foundation
|
||||
# Copyright (C) 2002-2006 Python Software Foundation
|
||||
# Contact: email-sig@python.org
|
||||
|
||||
"""Email address parsing code.
|
||||
|
@ -117,8 +117,7 @@ def parsedate_tz(data):
|
|||
else:
|
||||
tzsign = 1
|
||||
tzoffset = tzsign * ( (tzoffset//100)*3600 + (tzoffset % 100)*60)
|
||||
tuple = (yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset)
|
||||
return tuple
|
||||
return yy, mm, dd, thh, tmm, tss, 0, 1, 0, tzoffset
|
||||
|
||||
|
||||
def parsedate(data):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue