2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

fixed the issue that token expire time was one month ealier than the correct time

This commit is contained in:
WangXiaoPeng 2015-06-18 04:15:21 -04:00
parent 9f20f78816
commit 0827547cea

View File

@ -2289,6 +2289,7 @@ sub service_connection {
my ($tokenid, $exptime) = xCAT::xcatd->gettoken($req);
my ($sec,$min,$hour,$mday,$mon,$year) = localtime($exptime);
$year += 1900;
$mon += 1;
my $htime = "$year-$mon-$mday $hour:$min:$sec";
$resp = {data=>[{token => [{id => $tokenid, expire => $htime}]}]};
} else {