diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-04 14:16:20 +0000 |
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-04 14:16:20 +0000 |
| commit | faf41dada97c94c467a011fea642a018e29aa1cc (patch) | |
| tree | d70ff5b1a6f797fb2d9101e0a5bd6f1bdca703f0 | |
| parent | af86a9a01c36002d18b9666f470d7a3fce0e533c (diff) | |
| download | SmallYTChannelBot-faf41dada97c94c467a011fea642a018e29aa1cc.tar.gz SmallYTChannelBot-faf41dada97c94c467a011fea642a018e29aa1cc.zip | |
| -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") |
