Skip to content

Commit

Permalink
Milliseconden genegeerd in timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
TinusVL committed Apr 17, 2024
1 parent f567cb4 commit 7b2ce48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scouts_kampvisum_api/scouts_auth/inuits/utils/date_utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from datetime import datetime, date
import re


class DateUtils:
@staticmethod
def datetime_from_isoformat(datetime_string: str = None) -> datetime:
if not datetime_string:
return None
return datetime.fromisoformat(datetime_string)
return datetime.fromisoformat(re.sub('\.[0-9]+', '', datetime_string))

@staticmethod
def date_from_isoformat(datetime_string: str = None) -> date:
Expand Down

0 comments on commit 7b2ce48

Please sign in to comment.