MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / file_mtime

Function file_mtime

tools/python-3.11.9-amd64/Tools/scripts/diff.py:14–17  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

12from datetime import datetime, timezone
13
14def file_mtime(path):
15 t = datetime.fromtimestamp(os.stat(path).st_mtime,
16 timezone.utc)
17 return t.astimezone().isoformat()
18
19def main():
20

Callers 1

mainFunction · 0.85

Calls 4

astimezoneMethod · 0.80
fromtimestampMethod · 0.45
statMethod · 0.45
isoformatMethod · 0.45

Tested by

no test coverage detected