On 10/28/20 5:22 AM, Sergey Poznyakoff wrote:
Is there a way to prevent this?
No, there is not (apart from setting the TZ variable before running tar).
To spell this out a bit more verbosely:
On a GNU or POSIXish system, the TZ variable says how to decode the timestamps
from UTC. If you use TZ='America/Los_Angeles', for example, you'll get the same
output from 'tar -tv' regardless of whether you run 'tar' in summer or in winter.
On a Microsoft Windows system, it's easier to get this wrong, as MS-Windows
historically used local time rather than UTC internally, and there are hacks to
convert between local time and UTC that often go awry. Possibly this is the
problem the user ran into. There may well be a workaround involving setting TZ,
but the user may need someone with MS-Windows expertise to figure out what
actually happened.