equal
deleted
inserted
replaced
1064 |
1064 |
1065 def parsedate(string, formats=None): |
1065 def parsedate(string, formats=None): |
1066 """parse a localized time string and return a (unixtime, offset) tuple. |
1066 """parse a localized time string and return a (unixtime, offset) tuple. |
1067 The date may be a "unixtime offset" string or in one of the specified |
1067 The date may be a "unixtime offset" string or in one of the specified |
1068 formats.""" |
1068 formats.""" |
|
1069 if not string: |
|
1070 return 0, 0 |
1069 if not formats: |
1071 if not formats: |
1070 formats = defaultdateformats |
1072 formats = defaultdateformats |
1071 try: |
1073 try: |
1072 when, offset = map(int, string.split(' ')) |
1074 when, offset = map(int, string.split(' ')) |
1073 except ValueError: |
1075 except ValueError: |