X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/bf3ebdee73154eef706afd22e5700e0860587b9a..65a1431e753fccbbc735a58491b395070081dc8a:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index e0e1040..b9103d1 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -262,8 +262,10 @@ class SerializingObject(object): # If the value is already localized, there is no need to change # time zone at this point. Also None is a valid value too. localized = value - elif isinstance(value, six.string_types): + elif (isinstance(value, six.string_types) + and self.warrior.version > VERSION_2_4_0): # For strings, use 'task calc' to evaluate the string to datetime + # available since TW 2.4.0 args = value.split() result = self.warrior.execute_command(['calc'] + args) naive = datetime.datetime.strptime(result[0], DATE_FORMAT_CALC)