揮発性のメモ2

http://d.hatena.ne.jp/iww/

2013-08-20から1日間の記事一覧

Time::Piece で日時の計算がおかしい

1年ごとの日付を表示してみる #!/usr/bin/perl use Time::Piece; use Time::Seconds; my $tp = localtime; for( my $i=0; $i<13; $i++ ){ $tp += ONE_YEAR; print $tp->strftime("%F %T\n"); } $ ./hoge.pl 2014-08-20 17:10:07 2015-08-20 22:58:57 2016-08…