35
37
timestamp_str, timezone_str = s.split(' ', 1)
36
38
timestamp = float(timestamp_str)
38
40
return timestamp, timezone
42
44
"""Parse a timezone specification in the [+|-]HHMM format.
44
46
:return: the timezone offset in seconds.
46
48
# from git_repository.py in bzr-git
48
51
sign = {'+': +1, '-': -1}[tz[0]]
51
54
return sign * 60 * (60 * hours + minutes)
55
58
"""Parse a date from a rfc2822 string.
57
60
See the spec for details.