From 4addefd57d81c7fa02e418638976f14537a6eca7 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli <evilsocket@gmail.com> Date: Thu, 24 Oct 2019 12:48:04 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/mesh/peer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pwnagotchi/mesh/peer.py b/pwnagotchi/mesh/peer.py index 6415752..01428bf 100644 --- a/pwnagotchi/mesh/peer.py +++ b/pwnagotchi/mesh/peer.py @@ -6,6 +6,8 @@ import pwnagotchi.ui.faces as faces def parse_rfc3339(dt): + if dt == "0001-01-01T00:00:00Z": + return datetime.datetime.now() return datetime.datetime.strptime(dt.split('.')[0], "%Y-%m-%dT%H:%M:%S")