git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] git svn fetch: Create correct commit timestamp when using --localtime
@ 2017-08-05  0:12 Urs Thuermann
  2017-08-07 22:08 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Urs Thuermann @ 2017-08-05  0:12 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-08 19:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-05  0:12 [PATCH] git svn fetch: Create correct commit timestamp when using --localtime Urs Thuermann
2017-08-07 22:08 ` 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

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).