From 55bc059161e5f48e2ad916ff9f1d300a72ccaf65 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Sat, 9 Mar 2013 22:41:30 -0500 Subject: [PATCH] Added datetime format --- PLC/Timestamp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PLC/Timestamp.py b/PLC/Timestamp.py index 2b01a438..7087baf5 100644 --- a/PLC/Timestamp.py +++ b/PLC/Timestamp.py @@ -21,6 +21,7 @@ class Timestamp: # this is how we expose times to SQL sql_format = "%Y-%m-%d %H:%M:%S" sql_format_utc = "%Y-%m-%d %H:%M:%S UTC" + # this one (datetime.isoformat) would work too but that's less readable - we support this input though iso_format = "%Y-%m-%dT%H:%M:%S" # sometimes it's convenient to understand more formats @@ -29,6 +30,7 @@ class Timestamp: iso_format, "%Y-%m-%d %H:%M", "%Y-%m-%d %H:%M UTC", + "%Y-%m-%d %H:%M:%S.%f" ] # for timestamps we usually accept either an int, or an ISO string, -- 2.47.0