git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: clime <clime7@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: :format:%s for date fields seems to be shifted by timezone
Date: Sun, 3 May 2020 12:15:14 +0200	[thread overview]
Message-ID: <CAGqZTUu2U6FFXGTXihC64O0gB5Bz_Z3MbD750kMoJWMciAGH6w@mail.gmail.com> (raw)

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

             reply	other threads:[~2020-05-03 10:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 10:15 clime [this message]
2020-05-04 15:43 ` :format:%s for date fields seems to be shifted by timezone Jeff King
2020-05-06 18:03   ` clime
2020-05-06 19:06     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGqZTUu2U6FFXGTXihC64O0gB5Bz_Z3MbD750kMoJWMciAGH6w@mail.gmail.com \
    --to=clime7@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).