[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time zone changes and "tar --list --verbose"

From: Paul Eggert
Subject: Re: Time zone changes and "tar --list --verbose"
Date: Wed, 28 Oct 2020 11:35:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]