##// END OF EJS Templates
util: explicitly tests for None...
Pierre-Yves David -
r31465:da83f12d default
parent child Browse files
Show More
@@ -1831,7 +1831,8 b' def parsetimezone(s):'
1831 def strdate(string, format, defaults=None):
1831 def strdate(string, format, defaults=None):
1832 """parse a localized time string and return a (unixtime, offset) tuple.
1832 """parse a localized time string and return a (unixtime, offset) tuple.
1833 if the string cannot be parsed, ValueError is raised."""
1833 if the string cannot be parsed, ValueError is raised."""
1834 defaults = defaults or {}
1834 if defaults is None:
1835 defaults = {}
1835
1836
1836 # NOTE: unixtime = localunixtime + offset
1837 # NOTE: unixtime = localunixtime + offset
1837 offset, date = parsetimezone(string)
1838 offset, date = parsetimezone(string)
General Comments 0
You need to be logged in to leave comments. Login now