• Joe Tsai's avatar
    archive/zip: preserve old FileHeader.ModTime behavior · d85a3535
    Joe Tsai authored
    In order to avoid a regression where the date of the ModTime method
    changed behavior, simply preserve the old behavior of determining
    the date based on the legacy fields.
    
    This ensures that anyone relying on ModTime before Go1.10 will have
    the exact same behavior as before.
    New users should use FileHeader.Modified instead.
    
    We keep the UTC coersion logic in SetModTime since some users
    manually compute timezone offsets in order to have precise control
    over the MS-DOS time field.
    
    Fixes #22738
    
    Change-Id: Ib18b6ebd863bcf645748e083357dce9bc788cdba
    Reviewed-on: https://go-review.googlesource.com/78031Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    d85a3535
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...