MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / bcf_time

Method bcf_time

src/opencdeserver/api/app/database/neo4j.py:40–48  ·  view source on GitHub ↗
(any_datetime)

Source from the content-addressed store, hash-verified

38
39 @staticmethod
40 def bcf_time(any_datetime):
41 if isinstance(any_datetime, str):
42 datetime_any = parser.parse(any_datetime).astimezone(pytz.utc)
43 elif isinstance(any_datetime, type(datetime.now())):
44 datetime_any = any_datetime.astimezone(pytz.utc)
45 else:
46 return False
47 string_date = datetime_any.isoformat(sep="T", timespec="milliseconds")
48 return str(string_date)
49
50 @staticmethod
51 def safe_path(path_name):

Calls 2

typeFunction · 0.50
parseMethod · 0.45

Tested by

no test coverage detected