We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
What is the most idiomatic/efficient way to convert from a modification time retrieved from stat() call to a datetime object? https://stackoverflow.com/questions/39359245/from-stat-st-mtime-to-datetime
from datetime import datetime, timedelta, timezone from pathlib import Path path = Path('foo') path.touch() statResult = path.stat() modified = datetime.fromtimestamp(stat_result.st_mtime, tz=timezone.utc) print('modified', modified)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is the most idiomatic/efficient way to convert from a modification time retrieved from stat() call to a datetime object?
https://stackoverflow.com/questions/39359245/from-stat-st-mtime-to-datetime
The text was updated successfully, but these errors were encountered: