Skip to content

Commit

Permalink
debug in Time and Date Field
Browse files Browse the repository at this point in the history
  • Loading branch information
HanxSmile committed Apr 13, 2023
1 parent 2fbb649 commit 179d78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsdl/fields/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ class Date(BaseField):

def load_value(self, value):
if self.kwargs["fmt"]:
return datetime.strptime(value, format=self.kwargs["fmt"]).date()
return datetime.strptime(value, self.kwargs["fmt"]).date()
else:
return date.fromisoformat(value)

Expand Down Expand Up @@ -652,6 +652,6 @@ class Time(BaseField):

def load_value(self, value):
if self.kwargs["fmt"]:
return datetime.strptime(value, format=self.kwargs["fmt"]).time()
return datetime.strptime(value, self.kwargs["fmt"]).time()
else:
return date.fromisoformat(value)

0 comments on commit 179d78f

Please sign in to comment.