Skip to content

Commit

Permalink
Merge pull request rust-lang#97 from opilar/bugfix/gz-headers-docs
Browse files Browse the repository at this point in the history
GzHeader::mtime documentation clarification
  • Loading branch information
alexcrichton authored Apr 13, 2017
2 parents e1f7fd0 + 40f6eff commit 72df49c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/gz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,15 @@ impl Header {
self.comment.as_ref().map(|s| &s[..])
}

/// Returns the `mtime` field of this gzip stream's header, if present.
/// This gives the most recent modification time of the original file being compressed.
///
/// The time is in Unix format, i.e., seconds since 00:00:00 GMT, Jan. 1, 1970.
/// (Note that this may cause problems for MS-DOS and other systems that use local
/// rather than Universal time.) If the compressed data did not come from a file,
/// `mtime` is set to the time at which compression started.
/// `mtime` = 0 means no time stamp is available.
///
/// The usage of `mtime` is discouraged because of Year 2038 problem.
pub fn mtime(&self) -> u32 {
self.mtime
}
Expand Down

0 comments on commit 72df49c

Please sign in to comment.