bpo-43848: explain optional argument mtime in gzip.py. (GH-25410)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Joachim Wuttke 2024-03-28 14:43:07 +01:00 committed by GitHub
parent 8dbfdb2957
commit 9a388b9a64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 16 deletions

View file

@ -178,9 +178,10 @@ def __init__(self, filename=None, mode=None,
and 9 is slowest and produces the most compression. 0 is no compression
at all. The default is 9.
The mtime argument is an optional numeric timestamp to be written
to the last modification time field in the stream when compressing.
If omitted or None, the current time is used.
The optional mtime argument is the timestamp requested by gzip. The time
is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970.
If mtime is omitted or None, the current time is used. Use mtime = 0
to generate a compressed stream that does not depend on creation time.
"""