X-Git-Url: http://git.tremily.us/?p=git.git;a=blobdiff_plain;f=git-cvsimport.perl;h=344f1206d111a57ec529c34785ff8b1a6537e4d1;hp=0a31ebd82020f3aca0020d357c2028d5e7b5e37b;hb=HEAD;hpb=2173205f5c6e0e87c282cf94c13c8a41935cb1a2 diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 0a31ebd82..344f1206d 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -26,6 +26,7 @@ use IO::Socket; use IO::Pipe; use POSIX qw(strftime tzset dup2 ENOENT); use IPC::Open2; +use Git qw(get_tz_offset); $SIG{'PIPE'}="IGNORE"; set_timezone('UTC'); @@ -864,7 +865,9 @@ sub commit { } set_timezone($author_tz); - my $commit_date = strftime("%s %z", localtime($date)); + # $date is in the seconds since epoch format + my $tz_offset = get_tz_offset($date); + my $commit_date = "$date $tz_offset"; set_timezone('UTC'); $ENV{GIT_AUTHOR_NAME} = $author_name; $ENV{GIT_AUTHOR_EMAIL} = $author_email;