]> git.ipfire.org Git - thirdparty/git.git/commit - git-cvsimport.perl
cvsimport: work around perl tzset issue
authorJeff King <peff@peff.net>
Sun, 4 Nov 2012 12:25:36 +0000 (07:25 -0500)
committerJeff King <peff@peff.net>
Sun, 4 Nov 2012 13:02:41 +0000 (08:02 -0500)
commitc2b3af0537e0b2c7624913b0f26191e992beb12c
tree668259ecf1719a81c6f18f6027fd711b0c2e42ce
parentfb2c984148a344781833b25361154619230d9dd4
cvsimport: work around perl tzset issue

On many platforms, the first invocation of localtime_r will
check $TZ in the environment, but subsequent invocations
will use a cached value. That means that setting $ENV{TZ} in
the middle of the program may or may not have an effect on
later calls to localtime.  Perl 5.10.0 and later handles
this automatically for us, but we try to remain portable
back to 5.8. Work around it by calling tzset ourselves.
git-cvsimport.perl