2 File that contains utility functions used by various modules, but that do not fit into any single module. 8 Takes a datetime object and outputs a timestamp string with the format Y-m-d H:m:S.f 10 return obj.strftime(
'%Y-%m-%d %H:%M:%S.%f')
if isinstance(obj, datetime.datetime)
else obj
14 Takes a date string with the format Y-m-d H:m:S.f and gives back a datetime.datetime object 16 return datetime.datetime.strptime(date_string.replace(
",",
"."),
"%Y-%m-%d %H:%M:%S.%f")
20 Takes a since and, if it is Run-based expressed as Lumi-based, 21 returns the run number. 22 Otherwise, returns the since without transformations. 24 if time_type ==
"Run" and (since & 0xffffff) == 0:
def friendly_since(time_type, since)
def to_datetime(date_string)