Skip to content

Commit

Permalink
Fixed wrong month in xmlrpc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
vti committed Sep 30, 2009
1 parent e60d5be commit 8e5e6e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Bootylicious/Plugin/Xmlrpc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ sub _dispatcher {
my @time = localtime(time);
my $timestamp =
($year = $time[5] + 1900)
. ($month = sprintf("%02d", $time[4]))
. ($month = sprintf("%02d", $time[4] + 1))
. (sprintf("%02d", $time[3])) . 'T'
. sprintf("%02d", $time[2]) . ':'
. sprintf("%02d", $time[1]) . ':'
Expand Down
2 changes: 1 addition & 1 deletion t/plugin/xmlrpc.t
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $r =
_call('metaWeblog.newPost', 'bootylicious', 'foo', 'bar',
{title => 'foo', description => 'bar', categories => [qw/one two/]}, 'true');
my @time = localtime(time);
my $postid = ($time[5] + 1900) . '/' . sprintf("%02d", $time[4]) . '/' . 'foo';
my $postid = ($time[5] + 1900) . '/' . sprintf("%02d", $time[4] + 1) . '/' . 'foo';
ok($r->param);
is($r->param->value, $postid);

Expand Down

0 comments on commit 8e5e6e9

Please sign in to comment.