浏览代码

make string_to_datetime accept unicode

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74286 15284696-431f-4ddb-bdfa-cd5b030d7da7
Stefan Blumentrath 6 年之前
父节点
当前提交
e60505350c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/python/temporal/datetime_math.py

+ 1 - 1
lib/python/temporal/datetime_math.py

@@ -830,7 +830,7 @@ def string_to_datetime(time_string):
                  could not be converted
     """
 
-    if not isinstance(time_string, str):
+    if not isinstance(time_string, unicode) and not isinstance(time_string, str):
         return None
 
     time_object = check_datetime_string(time_string)