summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-09 05:33:35 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-09 05:33:35 +0000
commit70d040ddbd46c698ec5f887be2340bc44f275493 (patch)
tree5061c3ac71cc4a1fd1ba9a31d42901384bec0f2d
parentd90105890028926f3dac77d233028417145fbee8 (diff)
* ext/zlib/zlib.c: Document mtime header behavior with patch by @schneems
Fixes [GH-1129]: https://github.com/ruby/ruby/pull/1129 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/zlib/zlib.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d78f5ef1e..c594539724 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 9 14:32:23 2016 Zachary Scott <zzak@ruby-lang.org>
+
+ * ext/zlib/zlib.c: Document mtime header behavior with patch by @schneems
+ Fixes [GH-1129]: https://github.com/ruby/ruby/pull/1129
+
Tue Feb 9 13:52:49 2016 Zachary Scott <zzak@ruby-lang.org>
* re.c: Remove deprecated kcode argument from Regexp.new and compile
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 25b3e7afab..66e68916a8 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -3221,7 +3221,20 @@ rb_gzfile_set_lineno(VALUE obj, VALUE lineno)
* Document-method: Zlib::GzipWriter#mtime=
*
* Specify the modification time (+mtime+) in the gzip header.
- * Using a Fixnum or Integer
+ * Using a Fixnum or Integer.
+ *
+ * Setting the mtime in the gzip header does not effect the
+ * mtime of the file generated. Different utilities that
+ * expand the gzipped files may use the mtime
+ * header. For example the gunzip utility can use the `-N`
+ * flag which will set the resultant file's mtime to the
+ * value in the header. By default many tools will set
+ * the mtime of the expanded file to the mtime of the
+ * gzipped file, not the mtime in the header.
+ *
+ * If you do not set an mtime, the default value will be the time
+ * when compression started. Setting a value of 0 indicates
+ * no time stamp is available.
*/
static VALUE
rb_gzfile_set_mtime(VALUE obj, VALUE mtime)