From: Urs Thuermann <urs@isnogud.escape.de>
To: git@vger.kernel.org
Subject: [PATCH] git svn fetch: Create correct commit timestamp when using --localtime
Date: 05 Aug 2017 02:12:15 +0200 [thread overview]
Message-ID: <ygf8tiyx480.fsf@tehran.isnogud.escape.de> (raw)
In parse_svn_date() prepend the correct UTC offset to the timestamp
returned. This is the offset in effect at the commit time instead of
the offset in effect at calling time.
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
---
perl/Git/SVN.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl/Git/SVN.pm b/perl/Git/SVN.pm
index 98518f4..bc4eed3 100644
--- a/perl/Git/SVN.pm
+++ b/perl/Git/SVN.pm
@@ -1416,7 +1416,7 @@ sub parse_svn_date {
delete $ENV{TZ};
}
- my $our_TZ = get_tz_offset();
+ my $our_TZ = get_tz_offset($epoch_in_UTC);
# This converts $epoch_in_UTC into our local timezone.
my ($sec, $min, $hour, $mday, $mon, $year,
--
2.1.4
next reply other threads:[~2017-08-05 0:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 0:12 Urs Thuermann [this message]
2017-08-07 22:08 ` [PATCH] git svn fetch: Create correct commit timestamp when using --localtime Junio C Hamano
2017-08-08 2:42 ` Eric Wong
2017-08-08 16:57 ` Junio C Hamano
2017-08-02 14:36 ` git svn fetch --localtime produces wrong commit times Urs Thuermann
2017-08-02 21:34 ` Urs Thuermann
2017-08-08 18:56 ` [PATCH] git svn fetch: Create correct commit timestamp when using --localtime Urs Thuermann
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=ygf8tiyx480.fsf@tehran.isnogud.escape.de \
--to=urs@isnogud.escape.de \
--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).