Added datetime format
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 10 Mar 2013 03:41:30 +0000 (22:41 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 10 Mar 2013 03:41:30 +0000 (22:41 -0500)
PLC/Timestamp.py

index 2b01a43..7087baf 100644 (file)
@@ -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,