Skip to content

os.stat_result time fields: seconds since when? #137758

@nedbat

Description

@nedbat

Documentation

https://docs.python.org/3/library/os.html#os.stat_result says:

st_mtime

Time of most recent content modification expressed in seconds.

Number of seconds is a duration. The docs should explain how to turn this into a time. datetime.datetime.fromtimestamp() seems to be the answer.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions