diff options
| -rwxr-xr-x | database.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/database.py b/database.py index b80b548..300b224 100755 --- a/database.py +++ b/database.py @@ -28,12 +28,7 @@ class Database: commit (bool, optional): autocommit. Defaults to True. """ def get_date(stri): - # strip microseconds - stri = stri.split(",")[0] - try: - return datetime.datetime.strptime(stri, "%Y-%m-%d %H:%M:%S") - except ValueError: - return datetime.datetime.strptime(stri, "%b %d %Y %H:%M:%S") + return datetime.datetime.fromisoformat(stri) addFlag = False s = line.split("\t") |
