cpanでDateTime::Format::DateManipをインストールするとテストでコケる。
Running Build test
t/00load.t ......... ok
t/01conversions.t .. WARNING: the TZ Date::Manip config variable is deprecated
and will be removed in March 2016. Please use
the SetDate or ForceDate config variables instead.
Use of uninitialized value $mod in concatenation (.) or string at /usr/local/share/perl5/Date/Manip/TZ.pm line 181.
Use of uninitialized value $mod in concatenation (.) or string at /usr/local/share/perl5/Date/Manip/TZ.pm line 182.
Use of uninitialized value $mod in concatenation (.) or string at /usr/local/share/perl5/Date/Manip/TZ.pm line 183.
ERROR: [config_var] invalid zone in SetDate:
t/01conversions.t .. 1/6
# Failed test 'Parse Date 'March 23, 2003''
# at t/01conversions.t line 67.
# got: '2003-03-23T00:00:00.000000000 JST
# '
# expected: '2003-03-23T00:00:00.000000000 EST
# '
t/01conversions.t .. 2/6
# Failed test 'Format Date '2003-03-23T00:00:00''
# at t/01conversions.t line 73.
# got: '2003032317:00:00'
# expected: '2003032303:00:00'
# Failed test 'Format Date '2003-03-23T12:00:00''
# at t/01conversions.t line 73.
# got: '2003032405:00:00'
# expected: '2003032315:00:00'
# Looks like you failed 3 tests of 6.
t/01conversions.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/6 subtests
対策
テスト時のタイムゾーンがAsia/Tokyoになってるのが原因なので、環境変数TZ=US/Easternをセットしてテストを実施する。
これは…テストの作り方がまずい気がするんだけどどうなんだろう…。