Skip to content

docs: explain timestamp and asctime formatting - #85

Open
arindamsikder wants to merge 1 commit into
nhairs:mainfrom
arindamsikder:docs/timestamp-asctime-guide
Open

arindamsikder wants to merge 1 commit into
nhairs:mainfrom
arindamsikder:docs/timestamp-asctime-guide

Conversation

@arindamsikder

Copy link
Copy Markdown

Summary

Add a dedicated Logging Time guide and link it from the documentation navigation.

Problem

In #17, readers were unsure whether timestamp was supported, whether it emitted an epoch number or ISO 8601 string, and how it differed from asctime. The discussion explicitly welcomes a separate page documenting the current behavior.

Solution

  • Explain UTC timestamp values, custom field names, and why putting timestamp in fmt alone produces null.
  • Explain asctime, datefmt, UTC conversion, fractional seconds, and field-name collisions without changing their behavior.
  • Include reproducible formatter outputs and a complete dictConfig example, including the boolean-versus-string configuration distinction.

This is documentation only: no runtime, dependency, version, or time-format contract changes.

Testing

Validation ran on Python 3.11 in a credential-free, network-isolated Bubblewrap environment:

  • python -m pytest tests -q -p no:cacheprovider --basetemp=/tmp/pytest — 221 passed on both the unchanged base and the final tree.
  • Executed all five Python code blocks verbatim; all four displayed JSON outputs matched. Verified the dictConfig output fields and an aware UTC timestamp within the actual execution window.
  • Checked default exclusion, timestamp collision precedence, datefmt/converter independence and string-key behavior with the stdlib JSON, orjson and msgspec formatters.
  • python -m black --check --diff src tests — passed (14 files unchanged; Black emitted a Python-target-version warning).
  • python -m pylint src — passed, 10.00/10.
  • python -m mypy src tests --cache-dir /tmp/mypy-cache — passed, 14 source files.
  • python -m mkdocs build --site-dir /out/final-site — completed; rendered the new page and verified its navigation link. The seven pre-existing annotation warnings and unavailable external Python inventory diagnostic were identical on the unchanged base. The inventory cannot be downloaded in the offline sandbox.
  • git diff --check and independent automated diff review — passed.

The current unpinned Python docs handler 2.0 rejected the existing import configuration. For both baseline and final documentation builds, I used mkdocstrings 0.30.1, mkdocstrings-python 1.18.2, and mkdocs-gen-files 0.5.0. No dependency pins were added to this PR. Other Python versions and operating systems were not run locally.

Related Issue

Related to #17 — addresses the requested documentation, not the broader possible behavior changes discussed there.

AI assistance

Prepared by Hermes DEV using OpenAI GPT-6 Astra, including the documentation, local validation and an independent automated diff review. No human review is claimed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant