File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ async def version(
113113 """
114114 background_tasks .add_task (
115115 _log_visit ,
116- timestamp = datetime .datetime .now ().isoformat (),
116+ timestamp = datetime .datetime .now ().isoformat (timespec = "microseconds" ),
117117 version_multiqc = version_multiqc ,
118118 version_python = version_python ,
119119 operating_system = operating_system ,
@@ -240,7 +240,7 @@ def _summarize_visits(interval="5min") -> Response:
240240 dtype = "string" ,
241241 na_filter = False , # prevent empty strings from converting to nan or <NA>
242242 )
243- df ["start" ] = pd .to_datetime (df ["timestamp" ])
243+ df ["start" ] = pd .to_datetime (df ["timestamp" ], format = "%Y-%m-%dT%H:%M:%S.%f" , errors = "coerce" )
244244 df ["end" ] = df ["start" ] + pd .to_timedelta (interval )
245245 df ["start" ] = df ["start" ].dt .strftime ("%Y-%m-%d %H:%M" )
246246 df ["end" ] = df ["end" ].dt .strftime ("%Y-%m-%d %H:%M" )
You can’t perform that action at this time.
0 commit comments