python / python/cpython

os.stat_result time fields: seconds since when?

Open
#137,758 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

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
  • gh-137761

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the os.stat_result documentation linked in the issue and review the descriptions of st_mtime and related time fields. Update the documentation to explain what the seconds represent and how to convert them to a time, then check linked PR gh-137761 for the work already in progress.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.