:format:%s for date fields seems to be shifted by timezone
- From
clime <clime7@gmail.com>
- Date
- May 3, 2020, 10:15 UTC
- Message-ID
- <CAGqZTUu2U6FFXGTXihC64O0gB5Bz_Z3MbD750kMoJWMciAGH6w@mail.gmail.com>
Hello!
my current timezone is UTC+0200.
I create a test repo, add one commit and create a tag:
Now:
$ git for-each-ref --format="%(taggerdate:format:%s)" refs/tags 1588504146
$ date +"%s" 1588500585
$ git for-each-ref --format="%(taggerdate:raw)" refs/tags 1588500546 +0200
Somehow %(taggerdate:format:%s) gives a Unix timestamp which is one hour in future and it is different than what ` date +"%s"` gives around approximately the same time the tag was created.
clime